public static string MzCustomeSavePayOperator(string bjr, string bz, string dxjine, string settlement, string shoukuan, string sid, string skdate, string skr, string weishou) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { B_PayRecord bpr = new B_PayRecord(); bpr.pmoney = Convert.ToDecimal(shoukuan); bpr.pmoneystr = dxjine; bpr.sname = settlement; bpr.sid = sid; bpr.ps = bz; bpr.maker = skr; bpr.pdate = skdate; bpr.ptype = "dj"; bpr.cdate = DateTime.Now.ToString(); B_PayRecord cb = bprb.Query(" and sid='" + sid + "'"); CB_OrderState bos = cbsb.Query(" and sid='" + sid + "' and idmoney>0"); if (bos == null) { BaseSet.WorkFlowManage.EventBtnDo.FireEventBtn(sid, "0450", "1", "收款"); } if (Convert.ToDecimal(shoukuan) == Convert.ToDecimal(weishou)) { cbsb.UpState(sid, "idmoney", 2); } else { cbsb.UpState(sid, "idmoney", 1); } if (bprb.Add(bpr) > 0) { r = "S"; } else { r = "F"; } } else { r = iv.badstr; } return(r); }
public static string SavePayOperator(string acdate, string acje, string aperson, string bcode, string dxje, string paccount, string priperson, string remark, string settlement, string sid, string unaje) { string r = ""; SessionUserValidate iv = SysValidateBll.ValidateSession(); if (iv.f) { int pzt = 0; B_PayRecord bpr = new B_PayRecord(); bpr.pmoney = Convert.ToDecimal(acje); bpr.pmoneystr = dxje; bpr.sname = settlement; bpr.sid = sid; bpr.ps = remark; bpr.maker = aperson; bpr.pdate = acdate; bpr.cdate = DateTime.Now.ToString(); bpr.paccount = paccount; CB_OrderState bos = cbsb.Query(" and sid='" + sid + "' and imoney>0"); if (bprb.Add(bpr) > 0) { r = "S"; if (Convert.ToDecimal(acje) == Convert.ToDecimal(unaje)) { pzt = 2; } else { pzt = 1; } cbsb.UpState(sid, "imoney", pzt); if (bos == null) { BaseSet.WorkFlowManage.EventBtnDo.FireEventBtn(sid, bcode, "1", "收款"); } else { BaseSet.WorkFlowManage.EventBtnDo.FireEventBtn(sid, bcode, "1", "尾款收款"); } //判定是否执行成功 CB_OrderState cbos = cbsb.Query(" and sid='" + sid + "'"); if (cbos.imoney == pzt) { r = "S"; } else { r = "ML"; } } else { r = "F"; } } else { r = iv.badstr; } return(r); }