initial data

pull/1/head
paulcortez 2 years ago
parent d1e7c6f3c3
commit 89e765bb69

@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "7.0.3",
"commands": [
"dotnet-ef"
]
}
}
}

@ -0,0 +1,11 @@
<Router AppAssembly="@typeof(App).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>

@ -0,0 +1,16 @@
{
"ExtendedData": {
"inputs": [
"http://kwapp-srv/CommServices/BranchItemLedgerService.svc"
],
"collectionTypes": [
"System.Array",
"System.Collections.Generic.Dictionary`2"
],
"namespaceMappings": [
"*, BranchItemLedgerServices"
],
"targetFramework": "net7.0",
"typeReuseMode": "None"
}
}

@ -0,0 +1,606 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BranchItemLedgerServices
{
using System.Runtime.Serialization;
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="items", Namespace="http://schemas.datacontract.org/2004/07/KWERPService.CommServices")]
[System.Runtime.Serialization.KnownTypeAttribute(typeof(BranchItemLedgerServices.branchitemledger))]
public partial class items : object
{
private string catCodeField;
private float ctsField;
private string goldIDField;
private float gramsField;
private string item_descField;
private long itemcodeField;
private int karatField;
private string manrefField;
private string modelnoField;
private System.DateTime modifieddateField;
private double mrpField;
private string picField;
private double prevsrpField;
private string seriescodeField;
private string sizeField;
private string sizeunitField;
private System.DateTime sourceDateField;
private double srpField;
private string supCodeField;
[System.Runtime.Serialization.DataMemberAttribute()]
public string catCode
{
get
{
return this.catCodeField;
}
set
{
this.catCodeField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public float cts
{
get
{
return this.ctsField;
}
set
{
this.ctsField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string goldID
{
get
{
return this.goldIDField;
}
set
{
this.goldIDField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public float grams
{
get
{
return this.gramsField;
}
set
{
this.gramsField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string item_desc
{
get
{
return this.item_descField;
}
set
{
this.item_descField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public long itemcode
{
get
{
return this.itemcodeField;
}
set
{
this.itemcodeField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public int karat
{
get
{
return this.karatField;
}
set
{
this.karatField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string manref
{
get
{
return this.manrefField;
}
set
{
this.manrefField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string modelno
{
get
{
return this.modelnoField;
}
set
{
this.modelnoField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime modifieddate
{
get
{
return this.modifieddateField;
}
set
{
this.modifieddateField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public double mrp
{
get
{
return this.mrpField;
}
set
{
this.mrpField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string pic
{
get
{
return this.picField;
}
set
{
this.picField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public double prevsrp
{
get
{
return this.prevsrpField;
}
set
{
this.prevsrpField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string seriescode
{
get
{
return this.seriescodeField;
}
set
{
this.seriescodeField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string size
{
get
{
return this.sizeField;
}
set
{
this.sizeField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string sizeunit
{
get
{
return this.sizeunitField;
}
set
{
this.sizeunitField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime sourceDate
{
get
{
return this.sourceDateField;
}
set
{
this.sourceDateField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public double srp
{
get
{
return this.srpField;
}
set
{
this.srpField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string supCode
{
get
{
return this.supCodeField;
}
set
{
this.supCodeField = value;
}
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="branchitemledger", Namespace="http://schemas.datacontract.org/2004/07/KWERPService.CommServices")]
public partial class branchitemledger : BranchItemLedgerServices.items
{
private int adjustmentField;
private int beginningqtyField;
private string brCodeField;
private System.DateTime creationDateField;
private System.DateTime editDateField;
private int endingqtyField;
private int inqtyField;
private int outqtyField;
private string remarksField;
private int salesField;
[System.Runtime.Serialization.DataMemberAttribute()]
public int adjustment
{
get
{
return this.adjustmentField;
}
set
{
this.adjustmentField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public int beginningqty
{
get
{
return this.beginningqtyField;
}
set
{
this.beginningqtyField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string brCode
{
get
{
return this.brCodeField;
}
set
{
this.brCodeField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime creationDate
{
get
{
return this.creationDateField;
}
set
{
this.creationDateField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime editDate
{
get
{
return this.editDateField;
}
set
{
this.editDateField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public int endingqty
{
get
{
return this.endingqtyField;
}
set
{
this.endingqtyField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public int inqty
{
get
{
return this.inqtyField;
}
set
{
this.inqtyField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public int outqty
{
get
{
return this.outqtyField;
}
set
{
this.outqtyField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string remarks
{
get
{
return this.remarksField;
}
set
{
this.remarksField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public int sales
{
get
{
return this.salesField;
}
set
{
this.salesField = value;
}
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="BranchItemLedgerServices.IBranchItemLedgerService")]
public interface IBranchItemLedgerService
{
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchItemLedgerService/TestCall", ReplyAction="http://tempuri.org/IBranchItemLedgerService/TestCallResponse")]
System.Threading.Tasks.Task<string> TestCallAsync();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchItemLedgerService/GetRemoteDataByBrCodeItemcode", ReplyAction="http://tempuri.org/IBranchItemLedgerService/GetRemoteDataByBrCodeItemcodeResponse" +
"")]
System.Threading.Tasks.Task<BranchItemLedgerServices.branchitemledger> GetRemoteDataByBrCodeItemcodeAsync(string brCode, string itemcode);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchItemLedgerService/GetRemoteDataByBrCodeModelno", ReplyAction="http://tempuri.org/IBranchItemLedgerService/GetRemoteDataByBrCodeModelnoResponse")]
System.Threading.Tasks.Task<BranchItemLedgerServices.branchitemledger> GetRemoteDataByBrCodeModelnoAsync(string brCode, string modelno);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchItemLedgerService/GetRemoteDataByBrCode", ReplyAction="http://tempuri.org/IBranchItemLedgerService/GetRemoteDataByBrCodeResponse")]
System.Threading.Tasks.Task<BranchItemLedgerServices.branchitemledger[]> GetRemoteDataByBrCodeAsync(string brCode);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchItemLedgerService/UpdateRemoteBranchItemLedger", ReplyAction="http://tempuri.org/IBranchItemLedgerService/UpdateRemoteBranchItemLedgerResponse")]
System.Threading.Tasks.Task<int> UpdateRemoteBranchItemLedgerAsync(BranchItemLedgerServices.branchitemledger branchItemLedger);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
public interface IBranchItemLedgerServiceChannel : BranchItemLedgerServices.IBranchItemLedgerService, System.ServiceModel.IClientChannel
{
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
public partial class BranchItemLedgerServiceClient : System.ServiceModel.ClientBase<BranchItemLedgerServices.IBranchItemLedgerService>, BranchItemLedgerServices.IBranchItemLedgerService
{
/// <summary>
/// Implement this partial method to configure the service endpoint.
/// </summary>
/// <param name="serviceEndpoint">The endpoint to configure</param>
/// <param name="clientCredentials">The client credentials</param>
static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
public BranchItemLedgerServiceClient() :
base(BranchItemLedgerServiceClient.GetDefaultBinding(), BranchItemLedgerServiceClient.GetDefaultEndpointAddress())
{
this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IBranchItemLedgerService.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public BranchItemLedgerServiceClient(EndpointConfiguration endpointConfiguration) :
base(BranchItemLedgerServiceClient.GetBindingForEndpoint(endpointConfiguration), BranchItemLedgerServiceClient.GetEndpointAddress(endpointConfiguration))
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public BranchItemLedgerServiceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
base(BranchItemLedgerServiceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public BranchItemLedgerServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
base(BranchItemLedgerServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public BranchItemLedgerServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress)
{
}
public System.Threading.Tasks.Task<string> TestCallAsync()
{
return base.Channel.TestCallAsync();
}
public System.Threading.Tasks.Task<BranchItemLedgerServices.branchitemledger> GetRemoteDataByBrCodeItemcodeAsync(string brCode, string itemcode)
{
return base.Channel.GetRemoteDataByBrCodeItemcodeAsync(brCode, itemcode);
}
public System.Threading.Tasks.Task<BranchItemLedgerServices.branchitemledger> GetRemoteDataByBrCodeModelnoAsync(string brCode, string modelno)
{
return base.Channel.GetRemoteDataByBrCodeModelnoAsync(brCode, modelno);
}
public System.Threading.Tasks.Task<BranchItemLedgerServices.branchitemledger[]> GetRemoteDataByBrCodeAsync(string brCode)
{
return base.Channel.GetRemoteDataByBrCodeAsync(brCode);
}
public System.Threading.Tasks.Task<int> UpdateRemoteBranchItemLedgerAsync(BranchItemLedgerServices.branchitemledger branchItemLedger)
{
return base.Channel.UpdateRemoteBranchItemLedgerAsync(branchItemLedger);
}
public virtual System.Threading.Tasks.Task OpenAsync()
{
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
}
private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
{
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_IBranchItemLedgerService))
{
System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
result.MaxBufferSize = int.MaxValue;
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
result.MaxReceivedMessageSize = int.MaxValue;
result.AllowCookies = true;
return result;
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}
private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
{
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_IBranchItemLedgerService))
{
return new System.ServiceModel.EndpointAddress("http://kwapp-srv/CommServices/BranchItemLedgerService.svc");
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}
private static System.ServiceModel.Channels.Binding GetDefaultBinding()
{
return BranchItemLedgerServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IBranchItemLedgerService);
}
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
{
return BranchItemLedgerServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IBranchItemLedgerService);
}
public enum EndpointConfiguration
{
BasicHttpBinding_IBranchItemLedgerService,
}
}
}

@ -0,0 +1,16 @@
{
"ExtendedData": {
"inputs": [
"http://kwapp-srv/CommServices/BranchService.svc"
],
"collectionTypes": [
"System.Array",
"System.Collections.Generic.Dictionary`2"
],
"namespaceMappings": [
"*, BranchServices"
],
"targetFramework": "net7.0",
"typeReuseMode": "None"
}
}

@ -0,0 +1,268 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace BranchServices
{
using System.Runtime.Serialization;
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="branch", Namespace="http://schemas.datacontract.org/2004/07/KWERPService.CommServices")]
public partial class branch : object
{
private string addressField;
private string brCodeField;
private string brDescField;
private string contactInfoField;
private System.DateTime creationDateField;
private System.DateTime editDateField;
[System.Runtime.Serialization.DataMemberAttribute()]
public string address
{
get
{
return this.addressField;
}
set
{
this.addressField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string brCode
{
get
{
return this.brCodeField;
}
set
{
this.brCodeField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string brDesc
{
get
{
return this.brDescField;
}
set
{
this.brDescField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string contactInfo
{
get
{
return this.contactInfoField;
}
set
{
this.contactInfoField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime creationDate
{
get
{
return this.creationDateField;
}
set
{
this.creationDateField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime editDate
{
get
{
return this.editDateField;
}
set
{
this.editDateField = value;
}
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="BranchServices.IBranchService")]
public interface IBranchService
{
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/TestCall", ReplyAction="http://tempuri.org/IBranchService/TestCallResponse")]
System.Threading.Tasks.Task<string> TestCallAsync(BranchServices.branch b);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/GetData", ReplyAction="http://tempuri.org/IBranchService/GetDataResponse")]
System.Threading.Tasks.Task<BranchServices.branch[]> GetDataAsync();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/UpdateBranchInfo", ReplyAction="http://tempuri.org/IBranchService/UpdateBranchInfoResponse")]
System.Threading.Tasks.Task<int> UpdateBranchInfoAsync(BranchServices.branch Branch);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/AddBranch", ReplyAction="http://tempuri.org/IBranchService/AddBranchResponse")]
System.Threading.Tasks.Task<int> AddBranchAsync(BranchServices.branch Branch);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/DeleteByBranchCode", ReplyAction="http://tempuri.org/IBranchService/DeleteByBranchCodeResponse")]
System.Threading.Tasks.Task<int> DeleteByBranchCodeAsync(string branchCode);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/UpdateRemoteData", ReplyAction="http://tempuri.org/IBranchService/UpdateRemoteDataResponse")]
System.Threading.Tasks.Task<bool> UpdateRemoteDataAsync();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IBranchService/UpdateRemoteBranchData", ReplyAction="http://tempuri.org/IBranchService/UpdateRemoteBranchDataResponse")]
System.Threading.Tasks.Task<int> UpdateRemoteBranchDataAsync(BranchServices.branch Branch);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
public interface IBranchServiceChannel : BranchServices.IBranchService, System.ServiceModel.IClientChannel
{
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
public partial class BranchServiceClient : System.ServiceModel.ClientBase<BranchServices.IBranchService>, BranchServices.IBranchService
{
/// <summary>
/// Implement this partial method to configure the service endpoint.
/// </summary>
/// <param name="serviceEndpoint">The endpoint to configure</param>
/// <param name="clientCredentials">The client credentials</param>
static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
public BranchServiceClient() :
base(BranchServiceClient.GetDefaultBinding(), BranchServiceClient.GetDefaultEndpointAddress())
{
this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IBranchService.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public BranchServiceClient(EndpointConfiguration endpointConfiguration) :
base(BranchServiceClient.GetBindingForEndpoint(endpointConfiguration), BranchServiceClient.GetEndpointAddress(endpointConfiguration))
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public BranchServiceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
base(BranchServiceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public BranchServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
base(BranchServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public BranchServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress)
{
}
public System.Threading.Tasks.Task<string> TestCallAsync(BranchServices.branch b)
{
return base.Channel.TestCallAsync(b);
}
public System.Threading.Tasks.Task<BranchServices.branch[]> GetDataAsync()
{
return base.Channel.GetDataAsync();
}
public System.Threading.Tasks.Task<int> UpdateBranchInfoAsync(BranchServices.branch Branch)
{
return base.Channel.UpdateBranchInfoAsync(Branch);
}
public System.Threading.Tasks.Task<int> AddBranchAsync(BranchServices.branch Branch)
{
return base.Channel.AddBranchAsync(Branch);
}
public System.Threading.Tasks.Task<int> DeleteByBranchCodeAsync(string branchCode)
{
return base.Channel.DeleteByBranchCodeAsync(branchCode);
}
public System.Threading.Tasks.Task<bool> UpdateRemoteDataAsync()
{
return base.Channel.UpdateRemoteDataAsync();
}
public System.Threading.Tasks.Task<int> UpdateRemoteBranchDataAsync(BranchServices.branch Branch)
{
return base.Channel.UpdateRemoteBranchDataAsync(Branch);
}
public virtual System.Threading.Tasks.Task OpenAsync()
{
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
}
private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
{
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_IBranchService))
{
System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
result.MaxBufferSize = int.MaxValue;
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
result.MaxReceivedMessageSize = int.MaxValue;
result.AllowCookies = true;
return result;
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}
private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
{
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_IBranchService))
{
return new System.ServiceModel.EndpointAddress("http://kwapp-srv/CommServices/BranchService.svc");
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}
private static System.ServiceModel.Channels.Binding GetDefaultBinding()
{
return BranchServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IBranchService);
}
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
{
return BranchServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IBranchService);
}
public enum EndpointConfiguration
{
BasicHttpBinding_IBranchService,
}
}
}

@ -0,0 +1,16 @@
{
"ExtendedData": {
"inputs": [
"http://kwapp-srv/CommServices/ItemService.svc"
],
"collectionTypes": [
"System.Array",
"System.Collections.Generic.Dictionary`2"
],
"namespaceMappings": [
"*, ItemServices"
],
"targetFramework": "net7.0",
"typeReuseMode": "None"
}
}

@ -0,0 +1,703 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ItemServices
{
using System.Runtime.Serialization;
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="items", Namespace="http://schemas.datacontract.org/2004/07/KWERPService.CommServices")]
public partial class items : object
{
private string catCodeField;
private float ctsField;
private string goldIDField;
private float gramsField;
private string item_descField;
private long itemcodeField;
private int karatField;
private string manrefField;
private string modelnoField;
private System.DateTime modifieddateField;
private double mrpField;
private string picField;
private double prevsrpField;
private string seriescodeField;
private string sizeField;
private string sizeunitField;
private System.DateTime sourceDateField;
private double srpField;
private string supCodeField;
[System.Runtime.Serialization.DataMemberAttribute()]
public string catCode
{
get
{
return this.catCodeField;
}
set
{
this.catCodeField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public float cts
{
get
{
return this.ctsField;
}
set
{
this.ctsField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string goldID
{
get
{
return this.goldIDField;
}
set
{
this.goldIDField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public float grams
{
get
{
return this.gramsField;
}
set
{
this.gramsField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string item_desc
{
get
{
return this.item_descField;
}
set
{
this.item_descField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public long itemcode
{
get
{
return this.itemcodeField;
}
set
{
this.itemcodeField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public int karat
{
get
{
return this.karatField;
}
set
{
this.karatField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string manref
{
get
{
return this.manrefField;
}
set
{
this.manrefField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string modelno
{
get
{
return this.modelnoField;
}
set
{
this.modelnoField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime modifieddate
{
get
{
return this.modifieddateField;
}
set
{
this.modifieddateField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public double mrp
{
get
{
return this.mrpField;
}
set
{
this.mrpField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string pic
{
get
{
return this.picField;
}
set
{
this.picField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public double prevsrp
{
get
{
return this.prevsrpField;
}
set
{
this.prevsrpField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string seriescode
{
get
{
return this.seriescodeField;
}
set
{
this.seriescodeField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string size
{
get
{
return this.sizeField;
}
set
{
this.sizeField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string sizeunit
{
get
{
return this.sizeunitField;
}
set
{
this.sizeunitField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime sourceDate
{
get
{
return this.sourceDateField;
}
set
{
this.sourceDateField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public double srp
{
get
{
return this.srpField;
}
set
{
this.srpField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string supCode
{
get
{
return this.supCodeField;
}
set
{
this.supCodeField = value;
}
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="ItemServices.IItemService")]
public interface IItemService
{
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/TestCall", ReplyAction="http://tempuri.org/IItemService/TestCallResponse")]
System.Threading.Tasks.Task<string> TestCallAsync();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/GetData", ReplyAction="http://tempuri.org/IItemService/GetDataResponse")]
System.Threading.Tasks.Task<ItemServices.items[]> GetDataAsync();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/GetTopData", ReplyAction="http://tempuri.org/IItemService/GetTopDataResponse")]
System.Threading.Tasks.Task<ItemServices.items[]> GetTopDataAsync(int limit);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/GetDataByItemcode", ReplyAction="http://tempuri.org/IItemService/GetDataByItemcodeResponse")]
System.Threading.Tasks.Task<ItemServices.items> GetDataByItemcodeAsync(long itemcode);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/GetDataByModelno", ReplyAction="http://tempuri.org/IItemService/GetDataByModelnoResponse")]
System.Threading.Tasks.Task<ItemServices.items> GetDataByModelnoAsync(string modelno);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/GetItemListByModelnos", ReplyAction="http://tempuri.org/IItemService/GetItemListByModelnosResponse")]
System.Threading.Tasks.Task<ItemServices.items[]> GetItemListByModelnosAsync(string[] modelnos);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/GetItemListByModelnoStartsWith", ReplyAction="http://tempuri.org/IItemService/GetItemListByModelnoStartsWithResponse")]
System.Threading.Tasks.Task<ItemServices.items[]> GetItemListByModelnoStartsWithAsync(string modelno);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/GetItemListByDescription", ReplyAction="http://tempuri.org/IItemService/GetItemListByDescriptionResponse")]
System.Threading.Tasks.Task<ItemServices.items[]> GetItemListByDescriptionAsync(string description);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/GetItemListByDynamicParameter", ReplyAction="http://tempuri.org/IItemService/GetItemListByDynamicParameterResponse")]
System.Threading.Tasks.Task<ItemServices.items[]> GetItemListByDynamicParameterAsync(string SQLFilters);
// CODEGEN: Generating message contract since the operation has multiple return values.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/AddItem", ReplyAction="http://tempuri.org/IItemService/AddItemResponse")]
System.Threading.Tasks.Task<ItemServices.AddItemResponse> AddItemAsync(ItemServices.AddItemRequest request);
// CODEGEN: Generating message contract since the operation has multiple return values.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/UpdateItemDetails", ReplyAction="http://tempuri.org/IItemService/UpdateItemDetailsResponse")]
System.Threading.Tasks.Task<ItemServices.UpdateItemDetailsResponse> UpdateItemDetailsAsync(ItemServices.UpdateItemDetailsRequest request);
// CODEGEN: Generating message contract since the operation has multiple return values.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/UpdateItemSRP", ReplyAction="http://tempuri.org/IItemService/UpdateItemSRPResponse")]
System.Threading.Tasks.Task<ItemServices.UpdateItemSRPResponse> UpdateItemSRPAsync(ItemServices.UpdateItemSRPRequest request);
// CODEGEN: Generating message contract since the operation has multiple return values.
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/UpdateItemMRPSRP", ReplyAction="http://tempuri.org/IItemService/UpdateItemMRPSRPResponse")]
System.Threading.Tasks.Task<ItemServices.UpdateItemMRPSRPResponse> UpdateItemMRPSRPAsync(ItemServices.UpdateItemMRPSRPRequest request);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/UpdateItemImage", ReplyAction="http://tempuri.org/IItemService/UpdateItemImageResponse")]
System.Threading.Tasks.Task<bool> UpdateItemImageAsync(long itemcode, string imgPath);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IItemService/SendByteImage", ReplyAction="http://tempuri.org/IItemService/SendByteImageResponse")]
System.Threading.Tasks.Task<byte[]> SendByteImageAsync(byte[] img);
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.MessageContractAttribute(WrapperName="AddItem", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
public partial class AddItemRequest
{
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
public ItemServices.items item;
public AddItemRequest()
{
}
public AddItemRequest(ItemServices.items item)
{
this.item = item;
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.MessageContractAttribute(WrapperName="AddItemResponse", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
public partial class AddItemResponse
{
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
public bool AddItemResult;
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=1)]
public long itemcode;
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=2)]
public string modelno;
public AddItemResponse()
{
}
public AddItemResponse(bool AddItemResult, long itemcode, string modelno)
{
this.AddItemResult = AddItemResult;
this.itemcode = itemcode;
this.modelno = modelno;
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.MessageContractAttribute(WrapperName="UpdateItemDetails", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
public partial class UpdateItemDetailsRequest
{
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
public ItemServices.items item;
public UpdateItemDetailsRequest()
{
}
public UpdateItemDetailsRequest(ItemServices.items item)
{
this.item = item;
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.MessageContractAttribute(WrapperName="UpdateItemDetailsResponse", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
public partial class UpdateItemDetailsResponse
{
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
public int UpdateItemDetailsResult;
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=1)]
public string ERROR_MSG;
public UpdateItemDetailsResponse()
{
}
public UpdateItemDetailsResponse(int UpdateItemDetailsResult, string ERROR_MSG)
{
this.UpdateItemDetailsResult = UpdateItemDetailsResult;
this.ERROR_MSG = ERROR_MSG;
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.MessageContractAttribute(WrapperName="UpdateItemSRP", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
public partial class UpdateItemSRPRequest
{
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
public ItemServices.items[] itemList;
public UpdateItemSRPRequest()
{
}
public UpdateItemSRPRequest(ItemServices.items[] itemList)
{
this.itemList = itemList;
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.MessageContractAttribute(WrapperName="UpdateItemSRPResponse", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
public partial class UpdateItemSRPResponse
{
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
public int UpdateItemSRPResult;
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=1)]
public string ERROR_MSG;
public UpdateItemSRPResponse()
{
}
public UpdateItemSRPResponse(int UpdateItemSRPResult, string ERROR_MSG)
{
this.UpdateItemSRPResult = UpdateItemSRPResult;
this.ERROR_MSG = ERROR_MSG;
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.MessageContractAttribute(WrapperName="UpdateItemMRPSRP", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
public partial class UpdateItemMRPSRPRequest
{
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
public ItemServices.items[] itemList;
public UpdateItemMRPSRPRequest()
{
}
public UpdateItemMRPSRPRequest(ItemServices.items[] itemList)
{
this.itemList = itemList;
}
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.MessageContractAttribute(WrapperName="UpdateItemMRPSRPResponse", WrapperNamespace="http://tempuri.org/", IsWrapped=true)]
public partial class UpdateItemMRPSRPResponse
{
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=0)]
public int UpdateItemMRPSRPResult;
[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://tempuri.org/", Order=1)]
public string ERROR_MSG;
public UpdateItemMRPSRPResponse()
{
}
public UpdateItemMRPSRPResponse(int UpdateItemMRPSRPResult, string ERROR_MSG)
{
this.UpdateItemMRPSRPResult = UpdateItemMRPSRPResult;
this.ERROR_MSG = ERROR_MSG;
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
public interface IItemServiceChannel : ItemServices.IItemService, System.ServiceModel.IClientChannel
{
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
public partial class ItemServiceClient : System.ServiceModel.ClientBase<ItemServices.IItemService>, ItemServices.IItemService
{
/// <summary>
/// Implement this partial method to configure the service endpoint.
/// </summary>
/// <param name="serviceEndpoint">The endpoint to configure</param>
/// <param name="clientCredentials">The client credentials</param>
static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
public ItemServiceClient() :
base(ItemServiceClient.GetDefaultBinding(), ItemServiceClient.GetDefaultEndpointAddress())
{
this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IItemService.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public ItemServiceClient(EndpointConfiguration endpointConfiguration) :
base(ItemServiceClient.GetBindingForEndpoint(endpointConfiguration), ItemServiceClient.GetEndpointAddress(endpointConfiguration))
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public ItemServiceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
base(ItemServiceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public ItemServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
base(ItemServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public ItemServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress)
{
}
public System.Threading.Tasks.Task<string> TestCallAsync()
{
return base.Channel.TestCallAsync();
}
public System.Threading.Tasks.Task<ItemServices.items[]> GetDataAsync()
{
return base.Channel.GetDataAsync();
}
public System.Threading.Tasks.Task<ItemServices.items[]> GetTopDataAsync(int limit)
{
return base.Channel.GetTopDataAsync(limit);
}
public System.Threading.Tasks.Task<ItemServices.items> GetDataByItemcodeAsync(long itemcode)
{
return base.Channel.GetDataByItemcodeAsync(itemcode);
}
public System.Threading.Tasks.Task<ItemServices.items> GetDataByModelnoAsync(string modelno)
{
return base.Channel.GetDataByModelnoAsync(modelno);
}
public System.Threading.Tasks.Task<ItemServices.items[]> GetItemListByModelnosAsync(string[] modelnos)
{
return base.Channel.GetItemListByModelnosAsync(modelnos);
}
public System.Threading.Tasks.Task<ItemServices.items[]> GetItemListByModelnoStartsWithAsync(string modelno)
{
return base.Channel.GetItemListByModelnoStartsWithAsync(modelno);
}
public System.Threading.Tasks.Task<ItemServices.items[]> GetItemListByDescriptionAsync(string description)
{
return base.Channel.GetItemListByDescriptionAsync(description);
}
public System.Threading.Tasks.Task<ItemServices.items[]> GetItemListByDynamicParameterAsync(string SQLFilters)
{
return base.Channel.GetItemListByDynamicParameterAsync(SQLFilters);
}
public System.Threading.Tasks.Task<ItemServices.AddItemResponse> AddItemAsync(ItemServices.AddItemRequest request)
{
return base.Channel.AddItemAsync(request);
}
public System.Threading.Tasks.Task<ItemServices.UpdateItemDetailsResponse> UpdateItemDetailsAsync(ItemServices.UpdateItemDetailsRequest request)
{
return base.Channel.UpdateItemDetailsAsync(request);
}
public System.Threading.Tasks.Task<ItemServices.UpdateItemSRPResponse> UpdateItemSRPAsync(ItemServices.UpdateItemSRPRequest request)
{
return base.Channel.UpdateItemSRPAsync(request);
}
public System.Threading.Tasks.Task<ItemServices.UpdateItemMRPSRPResponse> UpdateItemMRPSRPAsync(ItemServices.UpdateItemMRPSRPRequest request)
{
return base.Channel.UpdateItemMRPSRPAsync(request);
}
public System.Threading.Tasks.Task<bool> UpdateItemImageAsync(long itemcode, string imgPath)
{
return base.Channel.UpdateItemImageAsync(itemcode, imgPath);
}
public System.Threading.Tasks.Task<byte[]> SendByteImageAsync(byte[] img)
{
return base.Channel.SendByteImageAsync(img);
}
public virtual System.Threading.Tasks.Task OpenAsync()
{
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
}
private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
{
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_IItemService))
{
System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
result.MaxBufferSize = int.MaxValue;
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
result.MaxReceivedMessageSize = int.MaxValue;
result.AllowCookies = true;
return result;
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}
private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
{
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_IItemService))
{
return new System.ServiceModel.EndpointAddress("http://kwapp-srv/CommServices/ItemService.svc");
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}
private static System.ServiceModel.Channels.Binding GetDefaultBinding()
{
return ItemServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IItemService);
}
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
{
return ItemServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IItemService);
}
public enum EndpointConfiguration
{
BasicHttpBinding_IItemService,
}
}
}

@ -0,0 +1,16 @@
{
"ExtendedData": {
"inputs": [
"http://kwapp-srv/CommServices/UserInfoService.svc"
],
"collectionTypes": [
"System.Array",
"System.Collections.Generic.Dictionary`2"
],
"namespaceMappings": [
"*, UserInfoServices"
],
"targetFramework": "net7.0",
"typeReuseMode": "None"
}
}

@ -0,0 +1,297 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace UserInfoServices
{
using System.Runtime.Serialization;
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.Runtime.Serialization.DataContractAttribute(Name="userinfo", Namespace="http://schemas.datacontract.org/2004/07/KWERPService.CommServices")]
public partial class userinfo : object
{
private string addressField;
private string branchField;
private string contactInfoField;
private System.DateTime creationDateField;
private System.DateTime editDateField;
private string fullNameField;
private string passField;
private int userlvlField;
private string usernameField;
[System.Runtime.Serialization.DataMemberAttribute()]
public string address
{
get
{
return this.addressField;
}
set
{
this.addressField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string branch
{
get
{
return this.branchField;
}
set
{
this.branchField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string contactInfo
{
get
{
return this.contactInfoField;
}
set
{
this.contactInfoField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime creationDate
{
get
{
return this.creationDateField;
}
set
{
this.creationDateField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public System.DateTime editDate
{
get
{
return this.editDateField;
}
set
{
this.editDateField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string fullName
{
get
{
return this.fullNameField;
}
set
{
this.fullNameField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string pass
{
get
{
return this.passField;
}
set
{
this.passField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public int userlvl
{
get
{
return this.userlvlField;
}
set
{
this.userlvlField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute()]
public string username
{
get
{
return this.usernameField;
}
set
{
this.usernameField = value;
}
}
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
[System.ServiceModel.ServiceContractAttribute(ConfigurationName="UserInfoServices.IUserInfoService")]
public interface IUserInfoService
{
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUserInfoService/TestCall", ReplyAction="http://tempuri.org/IUserInfoService/TestCallResponse")]
System.Threading.Tasks.Task<string> TestCallAsync();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUserInfoService/AuthenticateUser", ReplyAction="http://tempuri.org/IUserInfoService/AuthenticateUserResponse")]
System.Threading.Tasks.Task<UserInfoServices.userinfo> AuthenticateUserAsync(UserInfoServices.userinfo userAttemptingToLogin);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUserInfoService/GetUserInfoByUsername", ReplyAction="http://tempuri.org/IUserInfoService/GetUserInfoByUsernameResponse")]
System.Threading.Tasks.Task<UserInfoServices.userinfo> GetUserInfoByUsernameAsync(string username);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUserInfoService/GetData", ReplyAction="http://tempuri.org/IUserInfoService/GetDataResponse")]
System.Threading.Tasks.Task<UserInfoServices.userinfo[]> GetDataAsync();
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUserInfoService/md5Encoding", ReplyAction="http://tempuri.org/IUserInfoService/md5EncodingResponse")]
System.Threading.Tasks.Task<string> md5EncodingAsync(string originalPassword);
}
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
public interface IUserInfoServiceChannel : UserInfoServices.IUserInfoService, System.ServiceModel.IClientChannel
{
}
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.1.0")]
public partial class UserInfoServiceClient : System.ServiceModel.ClientBase<UserInfoServices.IUserInfoService>, UserInfoServices.IUserInfoService
{
/// <summary>
/// Implement this partial method to configure the service endpoint.
/// </summary>
/// <param name="serviceEndpoint">The endpoint to configure</param>
/// <param name="clientCredentials">The client credentials</param>
static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
public UserInfoServiceClient() :
base(UserInfoServiceClient.GetDefaultBinding(), UserInfoServiceClient.GetDefaultEndpointAddress())
{
this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_IUserInfoService.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public UserInfoServiceClient(EndpointConfiguration endpointConfiguration) :
base(UserInfoServiceClient.GetBindingForEndpoint(endpointConfiguration), UserInfoServiceClient.GetEndpointAddress(endpointConfiguration))
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public UserInfoServiceClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
base(UserInfoServiceClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public UserInfoServiceClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
base(UserInfoServiceClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
{
this.Endpoint.Name = endpointConfiguration.ToString();
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
}
public UserInfoServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
base(binding, remoteAddress)
{
}
public System.Threading.Tasks.Task<string> TestCallAsync()
{
return base.Channel.TestCallAsync();
}
public System.Threading.Tasks.Task<UserInfoServices.userinfo> AuthenticateUserAsync(UserInfoServices.userinfo userAttemptingToLogin)
{
return base.Channel.AuthenticateUserAsync(userAttemptingToLogin);
}
public System.Threading.Tasks.Task<UserInfoServices.userinfo> GetUserInfoByUsernameAsync(string username)
{
return base.Channel.GetUserInfoByUsernameAsync(username);
}
public System.Threading.Tasks.Task<UserInfoServices.userinfo[]> GetDataAsync()
{
return base.Channel.GetDataAsync();
}
public System.Threading.Tasks.Task<string> md5EncodingAsync(string originalPassword)
{
return base.Channel.md5EncodingAsync(originalPassword);
}
public virtual System.Threading.Tasks.Task OpenAsync()
{
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
}
private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
{
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_IUserInfoService))
{
System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
result.MaxBufferSize = int.MaxValue;
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
result.MaxReceivedMessageSize = int.MaxValue;
result.AllowCookies = true;
return result;
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}
private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
{
if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_IUserInfoService))
{
return new System.ServiceModel.EndpointAddress("http://kwapp-srv/CommServices/UserInfoService.svc");
}
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
}
private static System.ServiceModel.Channels.Binding GetDefaultBinding()
{
return UserInfoServiceClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_IUserInfoService);
}
private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress()
{
return UserInfoServiceClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_IUserInfoService);
}
public enum EndpointConfiguration
{
BasicHttpBinding_IUserInfoService,
}
}
}

@ -0,0 +1,13 @@
namespace KWWebInvApp.Data
{
public class UserServices
{
public UserInfoServices.userinfo? CurrentUser { get; set; } = null;
public bool IsAuthenticated()
{
if (CurrentUser == null) return false;
else return true;
}
}
}

@ -0,0 +1,13 @@
namespace KWWebInvApp.Data
{
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string? Summary { get; set; }
}
}

@ -0,0 +1,21 @@
namespace KWWebInvApp.Data
{
public class WeatherForecastService
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
public Task<WeatherForecast[]> GetForecastAsync(DateTime startDate)
{
var rng = new Random();
return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = startDate.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
}).ToArray());
}
}
}

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MudBlazor" Version="6.0.13" />
<PackageReference Include="System.ServiceModel.Duplex" Version="4.10.*" />
<PackageReference Include="System.ServiceModel.Federation" Version="4.10.*" />
<PackageReference Include="System.ServiceModel.Http" Version="4.10.*" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.10.*" />
<PackageReference Include="System.ServiceModel.Security" Version="4.10.*" />
</ItemGroup>
</Project>

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KWWebInvApp", "KWWebInvApp.csproj", "{720C48E7-70D0-4942-853F-36FE24851446}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{720C48E7-70D0-4942-853F-36FE24851446}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{720C48E7-70D0-4942-853F-36FE24851446}.Debug|Any CPU.Build.0 = Debug|Any CPU
{720C48E7-70D0-4942-853F-36FE24851446}.Release|Any CPU.ActiveCfg = Release|Any CPU
{720C48E7-70D0-4942-853F-36FE24851446}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6AAFD446-85BE-4ED0-BCFF-1840619BCA26}
EndGlobalSection
EndGlobal

@ -0,0 +1,22 @@
<MudDialog>
<DialogContent>
<MudText>@ContentText</MudText>
</DialogContent>
<DialogActions>
<MudButton Color="@Color" Variant="Variant.Filled" OnClick="Submit">@ButtonText</MudButton>
</DialogActions>
</MudDialog>
@code {
[CascadingParameter] MudDialogInstance MudDialog { get; set; }
[Parameter] public string ContentText { get; set; }
[Parameter] public string ButtonText { get; set; }
[Parameter] public Color Color { get; set; }
void Submit() => MudDialog.Close(DialogResult.Ok(true));
void Cancel() => MudDialog.Cancel();
}

@ -0,0 +1,200 @@
@page "/brmaintenance/invtycorrection"
@using KWWebInvApp.Data;
@inject IDialogService DialogService;
@inject UserServices userService;
<PageTitle>Branch Inventory Correction</PageTitle>
<MudText Typo="Typo.h4" GutterBottom="true">Branch Inventory Correction</MudText>
<MudText Typo="Typo.body1" GutterBottom="true">Select a specific branch and select the table to edit from the grid.</MudText>
<MudGrid>
<MudItem sm="12">
<MudCard>
<MudCardContent>
<MudGrid>
<MudItem xs="12" md="5">
<MudAutocomplete T="string" Label="Enter Branch Code" @bind-Value="selectedBranch" SearchFunc="@SearchBranch" CoerceValue=false />
</MudItem>
<MudItem xs="12" md="4">
<MudAutocomplete T="string" Label="Enter Model No." @bind-Value="selectedModelNo" SearchFunc="@SearchModelNo" CoerceValue=false />
</MudItem>
<MudItem xs="12" md="3">
<MudButton Variant="Variant.Filled" Color="Color.Primary" ButtonType="ButtonType.Button" OnClick="GetRecord" FullWidth="true" Disabled=@disableStatusGetRecord>Get Record</MudButton>
</MudItem>
</MudGrid>
</MudCardContent>
</MudCard>
</MudItem>
</MudGrid>
@if (branchItemLedger != null && branchItemLedger.modelno != null)
{
<MudText Typo="Typo.body1" Class="my-5 mt-10">Inventory details of @selectedBranch branch</MudText>
<EditForm Model="@branchItemLedger" OnValidSubmit="SaveBranchItemLedger">
<MudGrid>
<MudItem sm="12">
<MudCard>
<MudCardContent>
<MudGrid>
<MudItem sm="4">
<MudField Label="@branchItemLedger.modelno" Variant="Variant.Outlined">@branchItemLedger.itemcode</MudField>
</MudItem>
<MudItem sm="8">
<MudField Label="Remarks" Variant="Variant.Outlined">@branchItemLedger.remarks</MudField>
</MudItem>
</MudGrid>
<MudText Typo="Typo.body1" Class="my-3" Color="Color.Primary">Edit the details below</MudText>
<MudGrid>
<MudItem sm="12" md="2">
<MudTextField T="int" Label="Beginning Qty" @bind-Value="branchItemLedger.beginningqty" />
</MudItem>
<MudItem sm="12" md="2">
<MudTextField T="int" Label="In Qty" @bind-Value="branchItemLedger.inqty" />
</MudItem>
<MudItem sm="12" md="2">
<MudTextField T="int" Label="Out Qty" @bind-Value="branchItemLedger.outqty" />
</MudItem>
<MudItem sm="12" md="2">
<MudTextField T="int" Label="Sales Qty" @bind-Value="branchItemLedger.sales" />
</MudItem>
<MudItem sm="12" md="2">
<MudTextField T="int" Label="Adjustment" @bind-Value="branchItemLedger.adjustment" />
</MudItem>
<MudItem sm="12" md="2">
<MudTextField T="int" Label="Ending Qty" @bind-Value="branchItemLedger.endingqty" />
</MudItem>
</MudGrid>
</MudCardContent>
<MudCardActions>
<MudButton Class="ma-3" Variant="Variant.Filled" Color="Color.Primary" ButtonType="ButtonType.Submit" Disabled=@disableStatusSave>Update Record</MudButton>
<MudButton Class="ma-3" Variant="Variant.Filled" Color="Color.Secondary" OnClick="ResetUpdateBranchItemLedger">Reset</MudButton>
</MudCardActions>
</MudCard>
</MudItem>
</MudGrid>
</EditForm>
}
else
{
<MudText Typo="Typo.caption">No Record to Show</MudText>
}
@code {
BranchServices.branch[]? branchList;
string? selectedBranch, selectedModelNo;
BranchItemLedgerServices.branchitemledger? branchItemLedger = null;
bool disableStatusGetRecord = false, disableStatusSave = true;
BranchServices.BranchServiceClient branchServiceClient = new();
ItemServices.ItemServiceClient itemServiceClient = new();
BranchItemLedgerServices.BranchItemLedgerServiceClient branchItemLedgerServiceClient = new();
protected override async Task OnInitializedAsync()
{
branchList = await branchServiceClient.GetDataAsync();
}
async Task<IEnumerable<string>> SearchBranch(string value)
{
await Task.Delay(1);
if (string.IsNullOrEmpty(value))
return branchList.Select(c=>c.brCode);
return branchList.Where(c => c.brCode.Contains(value, StringComparison.InvariantCultureIgnoreCase)).Select(c=>c.brCode);
}
async Task<IEnumerable<string>> SearchModelNo(string value)
{
ItemServices.items[] itemList;
if (string.IsNullOrEmpty(value) || value.Length < 2)
{
itemList = await itemServiceClient.GetTopDataAsync(10);
return itemList.Select(c => c.modelno);
}
itemList = await itemServiceClient.GetItemListByModelnoStartsWithAsync(value);
return itemList.Select(c => c.modelno);
}
async Task GetRecord()
{
if(string.IsNullOrEmpty(selectedBranch))
{
var dialogParam = new DialogParameters();
dialogParam.Add("ContentText", "No branch. Please enter in the Branch field.");
dialogParam.Add("ButtonText", "OK");
dialogParam.Add("Color", Color.Error);
DialogService.Show<MessageDialogs.WarningDialog>("No Branch", dialogParam);
return;
}
if (string.IsNullOrEmpty(selectedModelNo))
{
var dialogParam = new DialogParameters();
dialogParam.Add("ContentText", "No model number. Please enter in the Model Number field");
dialogParam.Add("ButtonText", "OK");
dialogParam.Add("Color", Color.Error);
DialogService.Show<MessageDialogs.WarningDialog>("No Mode Number", dialogParam);
return;
}
disableStatusGetRecord = true;
disableStatusSave = true;
branchItemLedger = await branchItemLedgerServiceClient.GetRemoteDataByBrCodeModelnoAsync(selectedBranch, selectedModelNo);
disableStatusGetRecord = false;
disableStatusSave = false;
}
async Task SaveBranchItemLedger()
{
if (branchItemLedger == null)
return;
disableStatusGetRecord = true;
disableStatusSave = true;
branchItemLedger.remarks = $"|Manually edit by {userService?.CurrentUser?.fullName}. {DateTime.Now:MM/dd/yyyy} [{branchItemLedger.beginningqty} {branchItemLedger.inqty} {branchItemLedger.outqty} {branchItemLedger.sales} {branchItemLedger.adjustment} {branchItemLedger.endingqty}]";
int result = await branchItemLedgerServiceClient.UpdateRemoteBranchItemLedgerAsync(branchItemLedger);
if(result > 0)
{
var dialogParam = new DialogParameters();
dialogParam.Add("ContentText", "Successfully updated the record");
dialogParam.Add("ButtonText", "OK");
dialogParam.Add("Color", Color.Info);
DialogService.Show<MessageDialogs.WarningDialog>("Success", dialogParam);
await ResetUpdateBranchItemLedger();
}
else
{
var dialogParam = new DialogParameters();
dialogParam.Add("ContentText", "Failed to update the record");
dialogParam.Add("ButtonText", "OK");
dialogParam.Add("Color", Color.Error);
DialogService.Show<MessageDialogs.WarningDialog>("Failed", dialogParam);
disableStatusGetRecord = false;
disableStatusSave = false;
}
}
async Task ResetUpdateBranchItemLedger()
{
await Task.Delay(1);
disableStatusGetRecord = false;
disableStatusSave = true;
branchItemLedger = null;
}
}

@ -0,0 +1,40 @@
@page "/branches"
<h3>Branches</h3>
<PageTitle>Branches</PageTitle>
<MudText Typo="Typo.h3" GutterBottom="true">List of Branches</MudText>
@if (branchList == null)
{
<MudProgressCircular Color="Color.Default" Indeterminate="true" />
}
else
{
<MudTable Items="branchList" Hover="true" SortLabel="Sort By" Elevation="0" Dense>
<HeaderContent>
<MudTh><MudTableSortLabel InitialDirection="SortDirection.Ascending" SortBy="new Func<BranchServices.branch, object>(x=>x.brCode)">Branch Code</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<BranchServices.branch, object>(x=>x.brDesc)">Description</MudTableSortLabel></MudTh>
<MudTh>Summary</MudTh>
</HeaderContent>
<RowTemplate>
<MudTd DataLabel="Temp. (C)">@context.brCode</MudTd>
<MudTd DataLabel="Temp. (F)">@context.brDesc</MudTd>
<MudTd DataLabel="Summary">@context.address</MudTd>
</RowTemplate>
<PagerContent>
<MudTablePager PageSizeOptions="new int[]{50, 100}" />
</PagerContent>
</MudTable>
}
@code {
public BranchServices.branch[]? branchList;
protected override async Task OnInitializedAsync()
{
BranchServices.BranchServiceClient branchServiceClient = new();
branchList = await branchServiceClient.GetDataAsync();
}
}

@ -0,0 +1,17 @@
@page "/counter"
<PageTitle>Counter</PageTitle>
<MudText Typo="Typo.h3" GutterBottom="true">Counter</MudText>
<MudText Class="mb-4">Current count: @currentCount</MudText>
<MudButton Color="Color.Primary" Variant="Variant.Filled" @onclick="IncrementCount">Click me</MudButton>
@code {
private int currentCount = 0;
private void IncrementCount()
{
currentCount++;
}
}

@ -0,0 +1,42 @@
@page
@model KWWebInvApp.Pages.ErrorModel
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Error</title>
<link href="~/css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="~/css/app.css" rel="stylesheet" />
</head>
<body>
<div class="main">
<div class="content px-4">
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
</div>
</div>
</body>
</html>

@ -0,0 +1,27 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using System.Diagnostics;
namespace KWWebInvApp.Pages
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
[IgnoreAntiforgeryToken]
public class ErrorModel : PageModel
{
public string? RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
private readonly ILogger<ErrorModel> _logger;
public ErrorModel(ILogger<ErrorModel> logger)
{
_logger = logger;
}
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}

@ -0,0 +1,42 @@
@page "/fetchdata"
@using KWWebInvApp.Data
@inject WeatherForecastService ForecastService
<PageTitle>Weather forecast</PageTitle>
<MudText Typo="Typo.h3" GutterBottom="true">Weather forecast</MudText>
<MudText Class="mb-8">This component demonstrates fetching data from the server.</MudText>
@if (forecasts == null)
{
<MudProgressCircular Color="Color.Default" Indeterminate="true" />
}
else
{
<MudTable Items="forecasts" Hover="true" SortLabel="Sort By" Elevation="0">
<HeaderContent>
<MudTh><MudTableSortLabel InitialDirection="SortDirection.Ascending" SortBy="new Func<WeatherForecast, object>(x=>x.Date)">Date</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.TemperatureC)">Temp. (C)</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.TemperatureF)">Temp. (F)</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<WeatherForecast, object>(x=>x.Summary!)">Summary</MudTableSortLabel></MudTh>
</HeaderContent>
<RowTemplate>
<MudTd DataLabel="Date">@context.Date</MudTd>
<MudTd DataLabel="Temp. (C)">@context.TemperatureC</MudTd>
<MudTd DataLabel="Temp. (F)">@context.TemperatureF</MudTd>
<MudTd DataLabel="Summary">@context.Summary</MudTd>
</RowTemplate>
<PagerContent>
<MudTablePager PageSizeOptions="new int[]{50, 100}" />
</PagerContent>
</MudTable>
}
@code {
private WeatherForecast[]? forecasts;
protected override async Task OnInitializedAsync()
{
forecasts = await ForecastService.GetForecastAsync(DateTime.Now);
}
}

@ -0,0 +1,16 @@
@page "/"
@using KWWebInvApp.Data
@inject UserServices userServices
@inject NavigationManager navigationManager
<PageTitle>Index</PageTitle>
<MudText Typo="Typo.h3" GutterBottom="true">Karat World Inventory</MudText>
<MudText Class="mb-8">Welcome Karat World inventory system. A web based application.</MudText>
<MudAlert Severity="Severity.Normal">You can find documentation and examples on our website here: <MudLink Href="https://mudblazor.com" Typo="Typo.body2" Color="Color.Inherit"><b>www.mudblazor.com</b></MudLink></MudAlert>
@code
{
}

@ -0,0 +1,7 @@
@page "/items/itemdetails"
<h3>Item Details</h3>
@code {
}

@ -0,0 +1,7 @@
@page "/items/tracesearch"
<h3>ItemSearch</h3>
@code {
}

@ -0,0 +1,7 @@
@page "/items/tracehistory"
<h3>TraceHistory</h3>
@code {
}

@ -0,0 +1,8 @@
@page "/"
@namespace KWWebInvApp.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@{
Layout = "_Layout";
}
<component type="typeof(App)" render-mode="ServerPrerendered" />

@ -0,0 +1,31 @@
@using Microsoft.AspNetCore.Components.Web
@namespace KWWebInvApp.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="~/" />
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
</head>
<body>
@RenderBody()
<div id="blazor-error-ui">
<environment include="Staging,Production">
An error has occurred. This application may no longer respond until reloaded.
</environment>
<environment include="Development">
An unhandled exception has occurred. See browser dev tools for details.
</environment>
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.server.js"></script>
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
</body>
</html>

@ -0,0 +1,37 @@
using KWWebInvApp.Data;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Hosting.StaticWebAssets;
using MudBlazor.Services;
var builder = WebApplication.CreateBuilder(args);
StaticWebAssetsLoader.UseStaticWebAssets(builder.Environment, builder.Configuration);
// Add services to the container.
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddSingleton<WeatherForecastService>();
builder.Services.AddSingleton<UserServices>();
builder.Services.AddMudServices();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.MapBlazorHub();
app.MapFallbackToPage("/_Host");
app.Run();

@ -0,0 +1,28 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:61949",
"sslPort": 44393
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"KWWebInvApp": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

@ -0,0 +1,81 @@
@using KWWebInvApp.Data
@inject UserServices userService
@inject IDialogService DialogService
@inject NavigationManager navigationManager
<EditForm Model="@userAttemtingToLogin" OnValidSubmit="SubmitLogin">
<MudGrid>
<MudItem sm="12">
<MudCard>
<MudCardContent>
<MudText Typo="Typo.h4">Login</MudText>
<MudText Typo="Typo.subtitle1">Welcome to Merchandise and SAC System</MudText>
@if (error != null)
{
<MudAlert Severity="Severity.Error">@error</MudAlert>
}
<MudTextField T="string" Label="Username"
@bind-Value="userAttemtingToLogin.username" />
<MudTextField T="string" Label="Password"
InputType="InputType.Password"
@bind-Value="pass" />
<MudCardActions Class="mt-5">
<MudButton Variant="Variant.Filled" Color="Color.Primary" ButtonType="ButtonType.Submit" Disabled="submitButtonDisabled">@submitButtonText</MudButton>
<MudButton Variant="Variant.Filled" Color="Color.Secondary" Class="mx-2" ButtonType="ButtonType.Reset" Disabled="submitButtonDisabled">Reset</MudButton>
</MudCardActions>
</MudCardContent>
</MudCard>
</MudItem>
</MudGrid>
</EditForm>
@code {
bool submitButtonDisabled = false;
string? pass, error, submitButtonText = "Login";
UserInfoServices.userinfo userAttemtingToLogin = new();
//protected override async Task OnInitializedAsync()
//{
//}
async Task SubmitLogin()
{
error = null;
if (String.IsNullOrEmpty(userAttemtingToLogin.username) || String.IsNullOrEmpty(pass))
{
error = "Username and Password is required";
return;
}
UserInfoServices.UserInfoServiceClient userInfoServiceClient = new();
waitingButton(true);
userAttemtingToLogin.pass = await userInfoServiceClient.md5EncodingAsync(pass);
userService.CurrentUser = await userInfoServiceClient.AuthenticateUserAsync(userAttemtingToLogin);
waitingButton();
if (userService.CurrentUser == null)
error = "Invalid Username or Password";
else
navigationManager.NavigateTo("/");
}
void waitingButton(bool waiting = false)
{
if(waiting)
{
submitButtonDisabled = true;
submitButtonText = "Please Wait...";
}
else
{
submitButtonDisabled = false;
submitButtonText = "Login";
}
}
}

@ -0,0 +1,59 @@
@inherits LayoutComponentBase
@using KWWebInvApp.Data
@inject UserServices userServices
@inject NavigationManager navigationManager
<MudThemeProvider />
<MudDialogProvider />
<MudSnackbarProvider />
<MudLayout>
<MudAppBar Elevation="0">
@if (userServices.IsAuthenticated())
{
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => DrawerToggle())" />
<MudSpacer />
<MudIconButton Icon="@Icons.Custom.Brands.MudBlazor" Color="Color.Inherit" Link="https://mudblazor.com/" Target="_blank" />
<MudIconButton Icon="@Icons.Custom.Brands.GitHub" Color="Color.Inherit" Link="https://github.com/MudBlazor/MudBlazor/" Target="_blank" />
<MudIconButton Icon="@Icons.Material.Filled.Logout" Color="Color.Inherit" OnClick="Logout" />
}
</MudAppBar>
@if (userServices.IsAuthenticated())
{
<MudDrawer @bind-Open="_drawerOpen" Elevation="1">
<MudDrawerHeader>
<MudText Typo="Typo.h6">KW Web App</MudText>
</MudDrawerHeader>
<NavMenu />
</MudDrawer>
<MudMainContent>
<MudContainer MaxWidth="MaxWidth.Large" Class="my-16 pt-16">
@Body
</MudContainer>
</MudMainContent>
}
else
{
<MudMainContent>
<MudContainer MaxWidth="MaxWidth.Large" Class="my-16 pt-16">
<Login />
</MudContainer>
</MudMainContent>
}
</MudLayout>
@code {
bool _drawerOpen = true;
void DrawerToggle()
{
_drawerOpen = !_drawerOpen;
}
void Logout()
{
userServices.CurrentUser = null;
navigationManager.NavigateTo("/");
}
}

@ -0,0 +1,14 @@
<MudNavMenu>
<MudNavLink Href="" Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.Home">Home</MudNavLink>
<MudNavGroup Title="Items">
<MudNavLink Href="items/itemdetails" Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.List">Item Details</MudNavLink>
<MudNavLink Href="items/tracesearch" Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.List">Item Search</MudNavLink>
<MudNavLink Href="items/tracehistory" Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.List">Trace History</MudNavLink>
</MudNavGroup>
<MudNavGroup Title="Branch Maintenance">
<MudNavLink Href="brmaintenance/invtycorrection" Match="NavLinkMatch.All" Icon="@Icons.Material.Filled.List">Inventory Correction</MudNavLink>
</MudNavGroup>
<!-- <MudNavLink Href="counter" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Add">Counter</MudNavLink>
<MudNavLink Href="fetchdata" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.List">Fetch data</MudNavLink>
<MudNavLink Href="branches" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.List">View Branches</MudNavLink> -->
</MudNavMenu>

@ -0,0 +1,11 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Authorization
@using Microsoft.AspNetCore.Components.Authorization
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using MudBlazor
@using KWWebInvApp
@using KWWebInvApp.Shared

@ -0,0 +1,10 @@
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}

@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Loading…
Cancel
Save