public void UpdateMPAItemTransaction(Guid txID, MPAItem mpaItem) { Spring.Validation.ValidationErrors errors = new Spring.Validation.ValidationErrors(); MPADocumentDataSet MPAItemDS = (MPADocumentDataSet)TransactionService.GetDS(txID); MPADocumentDataSet.MPAItemRow mpaItemRow = MPAItemDS.MPAItem.FindByMPAItemID(mpaItem.MPAItemID); mpaItemRow.BeginEdit(); mpaItemRow.UserID = mpaItem.UserID.Userid; if (mpaItem.ActualAmount != null) { mpaItemRow.ActualAmount = mpaItem.ActualAmount; } if (mpaItem.ActualAmountNotExceed != null) { mpaItemRow.ActualAmountNotExceed = mpaItem.ActualAmountNotExceed; } if (mpaItem.AmountCompanyPackage != null) { mpaItemRow.AmountCompanyPackage = mpaItem.AmountCompanyPackage; } if (mpaItem.TotalAmount != null) { mpaItemRow.TotalAmount = mpaItem.TotalAmount; } mpaItemRow.MobilePhoneNo = mpaItem.MobilePhoneNo; mpaItemRow.MobileBrand = mpaItem.MobileBrand; mpaItemRow.MobileModel = mpaItem.MobileModel; mpaItemRow.CreBy = UserAccount.UserID; mpaItemRow.CreDate = DateTime.Now; mpaItemRow.UpdBy = UserAccount.UserID; mpaItemRow.UpdDate = DateTime.Now; mpaItemRow.UpdPgm = UserAccount.CurrentProgramCode; mpaItemRow.EndEdit(); }
public void ChangeRequesterMAPItem(Guid txID, MPAItem mpaItem) { MPADocumentDataSet mpaItemDS = (MPADocumentDataSet)TransactionService.GetDS(txID); MPADocumentDataSet.MPAItemRow mpaItemRow = mpaItemDS.MPAItem.FindByMPAItemID(mpaItem.MPAItemID); mpaItemRow.BeginEdit(); //mpaItemRow.MPAItemID = mpaItem.MPAItemID; mpaItemRow.UserID = mpaItem.UserID.Userid; mpaItemRow.ActualAmount = mpaItem.ActualAmount; mpaItemRow.ActualAmountNotExceed = mpaItem.ActualAmountNotExceed; mpaItemRow.AmountCompanyPackage = mpaItem.AmountCompanyPackage; mpaItemRow.TotalAmount = mpaItem.TotalAmount; mpaItemRow.MobilePhoneNo = mpaItem.MobilePhoneNo; mpaItemRow.MobileBrand = mpaItem.MobileBrand; mpaItemRow.MobileModel = mpaItem.MobileModel; mpaItemRow.UpdBy = UserAccount.UserID; mpaItemRow.UpdDate = DateTime.Now; mpaItemRow.UpdPgm = UserAccount.CurrentProgramCode; mpaItemRow.EndEdit(); }