public bool Add(MPUSettlementStatusInfo mPUSettlementStatusInfo) { MPUSettlementStatusCollections mPUSettlementStatusCollections = new MPUSettlementStatusCollections(); mPUSettlementStatusCollections.Add(mPUSettlementStatusInfo); return(Add(mPUSettlementStatusCollections)); }
public bool UpdatebySTFdate(MPUSettlementStatusInfo mPUSettlementStatusInfo) { try { DataController.StartTransaction(); DataController.Update(mPUSettlementStatusInfo.TransactionNo, mPUSettlementStatusInfo.TransactionDate, mPUSettlementStatusInfo.SettlementDate, mPUSettlementStatusInfo.UPdatedDate, mPUSettlementStatusInfo.STATUS); DataController.CommitTransaction(); } catch (Exception ex) { DataController.RollbackTransaction(); return(false); } return(true); }
private void MPUSettlementStatusRecord(int rowIndex, string status) { int i = rowIndex; try { //aa DateTime STFDate = Convert.ToDateTime(dgvSettlementLog.Rows[i].Cells["SettlementDate"].Value); MPU_Settlement_InfoController MPUSTFCtrl = new MPU_Settlement_InfoController(); MPU_Settlement_InfoCollections MPUSTFColl = MPUSTFCtrl.SelectBySettlementDate(STFDate.ToString("yyyy/MM/dd")); MPUSettlementStatusInfo MpuStmStatusinfo = new MPUSettlementStatusInfo(); MPUSettlementStatusController MPUSTFStaCol = new MPUSettlementStatusController(); MpuStmStatusinfo.MPUIncomingAmount = Convert.ToDecimal(dgvSettlementLog.Rows[i].Cells["IncomingAmount"].Value); MpuStmStatusinfo.MPUOutgoingAmount = Convert.ToDecimal(dgvSettlementLog.Rows[i].Cells["OUTGOINGAMOUNT"].Value); MpuStmStatusinfo.MPUIncomingFee = Convert.ToDecimal(dgvSettlementLog.Rows[i].Cells["INCOMINGFEE"].Value); MpuStmStatusinfo.MPUOutgoingFee = Convert.ToDecimal(dgvSettlementLog.Rows[i].Cells["OUTGOINGFEE"].Value); MpuStmStatusinfo.SettlementDate = Convert.ToDateTime(dgvSettlementLog.Rows[i].Cells["SettlementDate"].Value); MpuStmStatusinfo.CreatedDate = DateTime.Now; MpuStmStatusinfo.MPUSettlementID = Convert.ToString(System.Guid.NewGuid()); MpuStmStatusinfo.STATUS = status; if (MPUSTFColl.Count > 0) { MpuStmStatusinfo.CBSOutgoingAmount = Convert.ToDecimal(MPUSTFColl[0].INCOMINGAMOUNT); MpuStmStatusinfo.CBSOutgoingFee = Convert.ToDecimal(MPUSTFColl[0].INCOMINGMPUFEE); MpuStmStatusinfo.CBSIncomingAmount = Convert.ToDecimal(MPUSTFColl[0].OUTGOINGAMOUNT); MpuStmStatusinfo.CBSIncomingFee = Convert.ToDecimal(MPUSTFColl[0].OUTGOINGMPUFEE); } MPUSTFStaCol.Add(MpuStmStatusinfo); } catch (Exception ex) { MessageBox.Show(ex.Message); } }