private void EditDemandOrder() { List <TmpDemandOrderDTO> dtoListDemandOrderUpdate = new List <TmpDemandOrderDTO>(); GenerateTmpDemandOrderDTOList(dtoListDemandOrderUpdate); ValidateException.ThrowErrorItem(DemandOrderSimpleValidation.CheckRecord(new NZInt(null, dtoListDemandOrderUpdate.Count))); DemandOrderDTO dtoDemandOrder = GenerateHeaderDemandOrderDTO(); if (dtoListDemandOrderUpdate.Count > 0) { m_BIZDemandOrder.Update(dtoDemandOrder, dtoListDemandOrderUpdate); } }
private DemandOrderDTO GenerateHeaderDemandOrderDTO() { ValidateException.ThrowErrorItem(DemandOrderSimpleValidation.CheckEmptyDemandMonth(dtpDemand.Value)); ValidateException.ThrowErrorItem(DemandOrderSimpleValidation.CheckEmptyCustomerCode(new NZString(txtCusCD, txtCusCD.Text.ToNZString()))); ValidateException.ThrowErrorItem(DemandOrderSimpleValidation.CheckEmptyCustomerName(new NZString(txtCusCD, txtCusName.Text))); return(new DemandOrderDTO { CUSTOMER_CD = (NZString)txtCusCD.Text, YEAR_MONTH = (NZDateTime)dtpDemand.Value, CRT_BY = CommonLib.Common.CurrentUserInfomation.UserCD, CRT_DATE = (NZDateTime)DateTime.UtcNow, CRT_MACHINE = CommonLib.Common.CurrentUserInfomation.Machine, UPD_BY = CommonLib.Common.CurrentUserInfomation.UserCD, UPD_DATE = (NZDateTime)DateTime.UtcNow, UPD_MACHINE = CommonLib.Common.CurrentUserInfomation.Machine, }); }