change discount material response
This commit is contained in:
parent
4f3a990c60
commit
7763c5278d
|
|
@ -772,4 +772,10 @@ namespace OnlineSalesAutoCrop.CoreAPI.Models
|
||||||
Sent = 1,
|
Sent = 1,
|
||||||
Error = 2
|
Error = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum DiscountTypeEnum : short
|
||||||
|
{
|
||||||
|
ItemType = 1,
|
||||||
|
InvoiceValueType =2
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -166,12 +166,12 @@ public class GetAttendanceByEmpResponse
|
||||||
|
|
||||||
public class GetDiscountResponse
|
public class GetDiscountResponse
|
||||||
{
|
{
|
||||||
public string SalesOrgcCode { get; set; }
|
public string? SalesOrgCode { get; set; }
|
||||||
public string DiscountCode { get; set; }
|
public string DiscountCode { get; set; }
|
||||||
public string DiscountName { get; set; }
|
public string DiscountName { get; set; }
|
||||||
public string DistributorChannelCode { get; set; }
|
public string? DistributorChannelCode { get; set; }
|
||||||
public string DistributorChannelName { get; set; }
|
public string? DistributorChannelName { get; set; }
|
||||||
public string CalculationType { get; set; }
|
public DiscountTypeEnum DiscountType { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -179,10 +179,10 @@ public class GetDiscountMaterialResponse
|
||||||
{
|
{
|
||||||
public string DiscountCode { get; set; }
|
public string DiscountCode { get; set; }
|
||||||
public string CustomerCode { get; set; }
|
public string CustomerCode { get; set; }
|
||||||
public string MaterialCode { get; set; }
|
public string? MaterialCode { get; set; }
|
||||||
public string UnitOfMeasurement { get; set; }
|
public string UnitOfMeasurement { get; set; }
|
||||||
public string CalculationType { get; set; }
|
public string CalculationType { get; set; }
|
||||||
public decimal ScaleValue { get; set; }
|
public decimal Threshold { get; set; }
|
||||||
public decimal DiscountValue { get; set; }
|
public decimal DiscountValue { get; set; }
|
||||||
public DateTime StartDate { get; set; }
|
public DateTime StartDate { get; set; }
|
||||||
public DateTime EndDate { get; set; }
|
public DateTime EndDate { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
using Ease.NetCore.DataAccess.SQL;
|
using Ease.NetCore.DataAccess.SQL;
|
||||||
using Microsoft.Data.SqlClient;
|
using Microsoft.Data.SqlClient;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
|
using OnlineSalesAutoCrop.CoreAPI.Models;
|
||||||
using OnlineSalesAutoCrop.CoreAPI.Models.Global;
|
using OnlineSalesAutoCrop.CoreAPI.Models.Global;
|
||||||
using OnlineSalesAutoCrop.CoreAPI.Models.Requests.MobileApp;
|
using OnlineSalesAutoCrop.CoreAPI.Models.Requests.MobileApp;
|
||||||
using OnlineSalesAutoCrop.CoreAPI.Models.Responses;
|
using OnlineSalesAutoCrop.CoreAPI.Models.Responses;
|
||||||
|
|
@ -725,12 +726,12 @@ public class MobileMasterDataService : IMobileMasterDataService
|
||||||
{
|
{
|
||||||
response.Items.Add(new GetDiscountResponse
|
response.Items.Add(new GetDiscountResponse
|
||||||
{
|
{
|
||||||
SalesOrgcCode = dr.GetString(0),
|
SalesOrgCode = dr.IsDBNull(0) ? null : dr.GetString(0),
|
||||||
DiscountCode = dr.GetString(1),
|
DiscountCode = dr.GetString(1),
|
||||||
DiscountName = dr.GetString(2),
|
DiscountName = dr.GetString(2),
|
||||||
DistributorChannelCode = dr.GetString(3),
|
DistributorChannelCode = dr.IsDBNull(0) ? null : dr.GetString(3),
|
||||||
DistributorChannelName = dr.GetString(4),
|
DistributorChannelName = dr.IsDBNull(0) ? null : dr.GetString(4),
|
||||||
CalculationType = dr.GetString(5)
|
DiscountType = (DiscountTypeEnum)dr.GetInt32(5)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
dr.Close();
|
dr.Close();
|
||||||
|
|
@ -781,15 +782,15 @@ public class MobileMasterDataService : IMobileMasterDataService
|
||||||
{
|
{
|
||||||
response.Items.Add(new GetDiscountMaterialResponse
|
response.Items.Add(new GetDiscountMaterialResponse
|
||||||
{
|
{
|
||||||
DiscountCode = dr.GetString(0),
|
DiscountCode = dr.IsDBNull(0) ? null : dr.GetString(0),
|
||||||
CustomerCode = dr.GetString(1),
|
CustomerCode = dr.IsDBNull(1) ? null : dr.GetString(1),
|
||||||
MaterialCode = dr.GetString(2),
|
MaterialCode = dr.IsDBNull(2) ? null : dr.GetString(2),
|
||||||
UnitOfMeasurement = dr.GetString(3),
|
UnitOfMeasurement = dr.IsDBNull(3) ? null : dr.GetString(3),
|
||||||
CalculationType = dr.GetString(4),
|
CalculationType = dr.IsDBNull(4) ? null : dr.GetString(4),
|
||||||
DiscountValue = dr.GetDecimal(5),
|
DiscountValue = dr.GetDecimal(5),
|
||||||
StartDate = dr.GetDateTime(6),
|
StartDate = dr.GetDateTime(6),
|
||||||
EndDate = dr.GetDateTime(7),
|
EndDate = dr.GetDateTime(7),
|
||||||
ScaleValue = dr.GetDecimal(8),
|
Threshold = dr.GetDecimal(8),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
dr.Close();
|
dr.Close();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user