make optional some properties in MaterialFOCs for Integration
This commit is contained in:
parent
edf51b4271
commit
e9500278cd
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
|
|
@ -11,11 +10,9 @@ public class IntegrationMaterialFreeGoodsRequest
|
|||
{
|
||||
Slabs = new List<IntegrationMaterialFreeGoodItemRequest>();
|
||||
}
|
||||
[Required(ErrorMessage = "SalesOrg is required.")]
|
||||
[StringLength(10, MinimumLength = 1, ErrorMessage = "SalesOrg must be between 1 and 10 characters.")]
|
||||
public string SalesOrg { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "DistributionChannel is required.")]
|
||||
[StringLength(5, MinimumLength = 1, ErrorMessage = "DistributionChannel must be between 1 and 5 characters.")]
|
||||
public string DistributionChannel { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -12,13 +12,11 @@ public class IntegrationMaterialPriceRequest
|
|||
Slabs = new List<IntegrationMaterialPriceItemRequest>();
|
||||
}
|
||||
|
||||
[Required(ErrorMessage = "Sales Org is required.")]
|
||||
[StringLength(4, ErrorMessage = "Sales Org cannot exceed 4 characters.")]
|
||||
public string SalesOrg { get; set; }
|
||||
public string? SalesOrg { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "Distribution Channel is required.")]
|
||||
[StringLength(2, ErrorMessage = "Distribution Channel cannot exceed 2 characters.")]
|
||||
public string DistributionChannel { get; set; }
|
||||
public string? DistributionChannel { get; set; }
|
||||
|
||||
[StringLength(13, ErrorMessage = "Customer Number cannot exceed 13 characters.")]
|
||||
public string? CustomerNumber { get; set; }
|
||||
|
|
|
|||
|
|
@ -113,7 +113,8 @@ public class GetMaterialPriceResponse
|
|||
public string CustomerCode { get; set; }
|
||||
public string MaterialCode { get; set; }
|
||||
public decimal BasePrice { get; set; }
|
||||
public decimal? VatPercentage { get; set; }
|
||||
public decimal? VatValue { get; set; }
|
||||
public string? VatCalculationType { get; set; }
|
||||
}
|
||||
|
||||
public class GetCustomerResponse
|
||||
|
|
|
|||
|
|
@ -239,7 +239,8 @@ public class MobileMasterDataService : IMobileMasterDataService
|
|||
CustomerCode = dr.GetString(1),
|
||||
MaterialCode = dr.GetString(2),
|
||||
BasePrice = dr.GetDecimal(3),
|
||||
VatPercentage =dr.IsDBNull(4) ? null: dr.GetDecimal(4),
|
||||
VatValue =dr.IsDBNull(4) ? null: dr.GetDecimal(4),
|
||||
VatCalculationType =dr.IsDBNull(5) ? null: dr.GetString(5),
|
||||
});
|
||||
}
|
||||
dr.Close();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user