make some field nullable for employee in integration
This commit is contained in:
parent
2b938d35b2
commit
6f82ff2ae9
|
|
@ -46,21 +46,17 @@ public class IntegrationEmployeeRequest
|
||||||
[StringLength(40, ErrorMessage = "Sales org description cannot exceed 40 characters.")]
|
[StringLength(40, ErrorMessage = "Sales org description cannot exceed 40 characters.")]
|
||||||
public string SalesOrgDescription { get; set; }
|
public string SalesOrgDescription { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "Distribution channel is required.")]
|
|
||||||
[StringLength(2, ErrorMessage = "Distribution channel cannot exceed 2 characters.")]
|
[StringLength(2, ErrorMessage = "Distribution channel cannot exceed 2 characters.")]
|
||||||
public string DistChannel { get; set; }
|
public string? DistChannel { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "Distribution channel description is required.")]
|
|
||||||
[StringLength(20, ErrorMessage = "Distribution channel description cannot exceed 20 characters.")]
|
[StringLength(20, ErrorMessage = "Distribution channel description cannot exceed 20 characters.")]
|
||||||
public string DistChannelDescription { get; set; }
|
public string? DistChannelDescription { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "Division is required.")]
|
|
||||||
[StringLength(2, ErrorMessage = "Division cannot exceed 2 characters.")]
|
[StringLength(2, ErrorMessage = "Division cannot exceed 2 characters.")]
|
||||||
public string Division { get; set; }
|
public string? Division { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "Division description is required.")]
|
|
||||||
[StringLength(20, ErrorMessage = "Division description cannot exceed 20 characters.")]
|
[StringLength(20, ErrorMessage = "Division description cannot exceed 20 characters.")]
|
||||||
public string DivisionDescription { get; set; }
|
public string? DivisionDescription { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "Region/Area code is required.")]
|
[Required(ErrorMessage = "Region/Area code is required.")]
|
||||||
[StringLength(3, ErrorMessage = "Region/Area code cannot exceed 3 characters.")]
|
[StringLength(3, ErrorMessage = "Region/Area code cannot exceed 3 characters.")]
|
||||||
|
|
@ -82,21 +78,17 @@ public class IntegrationEmployeeRequest
|
||||||
[StringLength(20, ErrorMessage = "Territory description cannot exceed 20 characters.")]
|
[StringLength(20, ErrorMessage = "Territory description cannot exceed 20 characters.")]
|
||||||
public string TerritoryDescription { get; set; }
|
public string TerritoryDescription { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "Plant is required.")]
|
|
||||||
[StringLength(4, ErrorMessage = "Plant cannot exceed 4 characters.")]
|
[StringLength(4, ErrorMessage = "Plant cannot exceed 4 characters.")]
|
||||||
public string Plant { get; set; }
|
public string? Plant { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "Plant description is required.")]
|
|
||||||
[StringLength(30, ErrorMessage = "Plant description cannot exceed 30 characters.")]
|
[StringLength(30, ErrorMessage = "Plant description cannot exceed 30 characters.")]
|
||||||
public string PlantDescription { get; set; }
|
public string? PlantDescription { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "Status is required.")]
|
|
||||||
[StringLength(1, ErrorMessage = "Status cannot exceed 1 character.")]
|
[StringLength(1, ErrorMessage = "Status cannot exceed 1 character.")]
|
||||||
public string Status { get; set; }
|
public string? Status { get; set; }
|
||||||
|
|
||||||
[Required(ErrorMessage = "Status description is required.")]
|
|
||||||
[StringLength(30, ErrorMessage = "Status description cannot exceed 30 characters.")]
|
[StringLength(30, ErrorMessage = "Status description cannot exceed 30 characters.")]
|
||||||
public string StatusDescription { get; set; }
|
public string? StatusDescription { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EmployeeIntegrationByComapanyRequest
|
public class EmployeeIntegrationByComapanyRequest
|
||||||
|
|
|
||||||
|
|
@ -974,41 +974,41 @@ public class IntegrationService : IIntegrationService
|
||||||
SqlParameter[] p =
|
SqlParameter[] p =
|
||||||
[
|
[
|
||||||
SqlHelperExtension.CreateInParam(pName: "@EmployeeVendorCode", pType: SqlDbType.NVarChar, pValue: request.EmployeeVendorCode),
|
SqlHelperExtension.CreateInParam(pName: "@EmployeeVendorCode", pType: SqlDbType.NVarChar, pValue: request.EmployeeVendorCode),
|
||||||
SqlHelperExtension.CreateInParam(pName: "@CompanyCode", pType: SqlDbType.NVarChar, pValue: request.CompanyCode),
|
SqlHelperExtension.CreateInParam(pName: "@CompanyCode", pType: SqlDbType.NVarChar, pValue: request.CompanyCode),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@EmployeeVendorName", pType: SqlDbType.NVarChar, pValue: request.EmployeeVendorName),
|
SqlHelperExtension.CreateInParam(pName: "@EmployeeVendorName", pType: SqlDbType.NVarChar, pValue: request.EmployeeVendorName),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@Designation", pType: SqlDbType.NVarChar, pValue: request.Designation),
|
SqlHelperExtension.CreateInParam(pName: "@Designation", pType: SqlDbType.NVarChar, pValue: request.Designation),
|
||||||
SqlHelperExtension.CreateInParam(pName: "@DesignationDescription", pType: SqlDbType.NVarChar, pValue: request.DesignationDescription),
|
SqlHelperExtension.CreateInParam(pName: "@DesignationDescription", pType: SqlDbType.NVarChar, pValue: request.DesignationDescription),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@MobileNo", pType: SqlDbType.NVarChar, pValue: request.MobileNo),
|
SqlHelperExtension.CreateInParam(pName: "@MobileNo", pType: SqlDbType.NVarChar, pValue: request.MobileNo),
|
||||||
SqlHelperExtension.CreateInParam(pName: "@Mail", pType: SqlDbType.NVarChar, pValue: request.Mail),
|
SqlHelperExtension.CreateInParam(pName: "@Mail", pType: SqlDbType.NVarChar, pValue: request.Mail),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@CompanyName", pType: SqlDbType.NVarChar, pValue: request.CompanyName),
|
SqlHelperExtension.CreateInParam(pName: "@CompanyName", pType: SqlDbType.NVarChar, pValue: request.CompanyName),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@SalesOrg", pType: SqlDbType.NVarChar, pValue: request.SalesOrg),
|
SqlHelperExtension.CreateInParam(pName: "@SalesOrg", pType: SqlDbType.NVarChar, pValue: request.SalesOrg),
|
||||||
SqlHelperExtension.CreateInParam(pName: "@SalesOrgDescription", pType: SqlDbType.NVarChar, pValue: request.SalesOrgDescription),
|
SqlHelperExtension.CreateInParam(pName: "@SalesOrgDescription", pType: SqlDbType.NVarChar, pValue: request.SalesOrgDescription),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@DistChannel", pType: SqlDbType.NVarChar, pValue: request.DistChannel),
|
SqlHelperExtension.CreateInParam(pName: "@DistChannel", pType: SqlDbType.NVarChar, pValue: request.DistChannel),
|
||||||
SqlHelperExtension.CreateInParam(pName: "@DistChannelDescription", pType: SqlDbType.NVarChar, pValue: request.DistChannelDescription),
|
SqlHelperExtension.CreateInParam(pName: "@DistChannelDescription", pType: SqlDbType.NVarChar, pValue: request.DistChannelDescription),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@Division", pType: SqlDbType.NVarChar, pValue: request.Division),
|
SqlHelperExtension.CreateInParam(pName: "@Division", pType: SqlDbType.NVarChar, pValue: request.Division),
|
||||||
SqlHelperExtension.CreateInParam(pName: "@DivisionDescription", pType: SqlDbType.NVarChar, pValue: request.DivisionDescription),
|
SqlHelperExtension.CreateInParam(pName: "@DivisionDescription", pType: SqlDbType.NVarChar, pValue: request.DivisionDescription),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@RegionAreaCode", pType: SqlDbType.NVarChar, pValue: request.RegionAreaCode),
|
SqlHelperExtension.CreateInParam(pName: "@RegionAreaCode", pType: SqlDbType.NVarChar, pValue: request.RegionAreaCode),
|
||||||
SqlHelperExtension.CreateInParam(pName: "@RegionAreaDescription", pType: SqlDbType.NVarChar, pValue: request.RegionAreaDescription),
|
SqlHelperExtension.CreateInParam(pName: "@RegionAreaDescription", pType: SqlDbType.NVarChar, pValue: request.RegionAreaDescription),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@AreaAVSalesUnitCode", pType: SqlDbType.NVarChar, pValue: request.AreaAVSalesUnitCode),
|
SqlHelperExtension.CreateInParam(pName: "@AreaAVSalesUnitCode", pType: SqlDbType.NVarChar, pValue: request.AreaAVSalesUnitCode),
|
||||||
SqlHelperExtension.CreateInParam(pName: "@AreaAVSalesUnitDescription", pType: SqlDbType.NVarChar, pValue: request.AreaAVSalesUnitDescription),
|
SqlHelperExtension.CreateInParam(pName: "@AreaAVSalesUnitDescription", pType: SqlDbType.NVarChar, pValue: request.AreaAVSalesUnitDescription),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@Territory", pType: SqlDbType.NVarChar, pValue: request.Territory),
|
SqlHelperExtension.CreateInParam(pName: "@Territory", pType: SqlDbType.NVarChar, pValue: request.Territory),
|
||||||
SqlHelperExtension.CreateInParam(pName: "@TerritoryDescription", pType: SqlDbType.NVarChar, pValue: request.TerritoryDescription),
|
SqlHelperExtension.CreateInParam(pName: "@TerritoryDescription", pType: SqlDbType.NVarChar, pValue: request.TerritoryDescription),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@Plant", pType: SqlDbType.NVarChar, pValue: request.Plant),
|
SqlHelperExtension.CreateInParam(pName: "@Plant", pType: SqlDbType.NVarChar, pValue: request.Plant),
|
||||||
SqlHelperExtension.CreateInParam(pName: "@PlantDescription", pType: SqlDbType.NVarChar, pValue: request.PlantDescription),
|
SqlHelperExtension.CreateInParam(pName: "@PlantDescription", pType: SqlDbType.NVarChar, pValue: request.PlantDescription),
|
||||||
|
|
||||||
SqlHelperExtension.CreateInParam(pName: "@Status", pType: SqlDbType.NChar, pValue: request.Status),
|
SqlHelperExtension.CreateInParam(pName: "@Status", pType: SqlDbType.NChar, pValue: request.Status),
|
||||||
SqlHelperExtension.CreateInParam(pName: "@StatusDescription", pType: SqlDbType.NVarChar, pValue: request.StatusDescription)
|
SqlHelperExtension.CreateInParam(pName: "@StatusDescription", pType: SqlDbType.NVarChar, pValue: request.StatusDescription)
|
||||||
];
|
];
|
||||||
|
|
||||||
_ = tc.ExecuteNonQuerySp(spName: "dbo.UpdateEmployee", parameterValues: p);
|
_ = tc.ExecuteNonQuerySp(spName: "dbo.UpdateEmployee", parameterValues: p);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user