/// <summary> /// 绑定数据 /// </summary> protected void Bind() { int pageCount = 0; int Counts = 0; string strWhere = string.Empty; Hi.BLL.PAY_BankInfo bankinfobll = new Hi.BLL.PAY_BankInfo(); if (ViewState["strWhere"] != null) { strWhere += ViewState["strWhere"].ToString(); } //strWhere += " and AuditState=2 and IsEnabled=1 and CompID=" + LoginModel.IsLogined(this).CompID; //List<Hi.Model.PAY_BankInfo> list=bankinfobll.GetAllList(); Pager.PageSize = 20; if (ViewState["strWhere"] != null) { strWhere += ViewState["strWhere"].ToString(); } strWhere += " and vdef1 in (0,1,2) "; List <Hi.Model.PAY_BankInfo> BdutorModel = bankinfobll.GetList(Pager.PageSize, Pager.CurrentPageIndex, "bankcode", true, strWhere, out pageCount, out Counts); this.rptOtherBank.DataSource = BdutorModel; this.rptOtherBank.DataBind(); Pager.RecordCount = Counts; page = Pager.CurrentPageIndex.ToString(); }
/// <summary> /// 绑定事件 /// </summary> public void Bind() { Hi.Model.DIS_Order orderModel = new Hi.BLL.DIS_Order().GetModel(KeyID); this.hidUserName.Value = this.UserName; string strWhere = string.Empty; if (this.DisID != 0) { strWhere += " DisID = '" + this.DisID + "' "; } else { JScript.AlertMsgOne(this, "操作员没有对应的代理商!", JScript.IconOption.错误, 2500); } strWhere += " and Start = 1 and vdef6='0' and isnull(dr,0)=0"; List <Hi.Model.PAY_FastPayMent> fastList = new Hi.BLL.PAY_FastPayMent().GetList("", strWhere, ""); this.rptQpay.DataSource = fastList; this.rptQpay.DataBind(); SumNumber = fastList.ToArray().Length; List <Hi.Model.PAY_BankInfo> BankL = new Hi.BLL.PAY_BankInfo().GetList("", " vdef1=0", ""); this.rptOtherBank.DataSource = BankL; this.rptOtherBank.DataBind(); }
public void Bind() { Hi.Model.PAY_PrePayment prepayM = new Hi.BLL.PAY_PrePayment().GetModel(KeyID); if (prepayM == null) { JScript.AlertMethod(this, "该记录无效!", JScript.IconOption.错误, "function (){ location.replace('" + ("PrePayList.aspx") + "'); }"); return; } //支付金额小于0,直接支付失败 if (prepayM.price <= 0) { Response.Redirect("Error.aspx?type=" + Common.DesEncrypt("2", Common.EncryptKey) + "&KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey)); return; } if (prepayM.Start == 1) { Response.Redirect("Error.aspx?type=" + Common.DesEncrypt("2", Common.EncryptKey) + "&KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey)); return; } this.hidKeyID.Value = Convert.ToString(KeyID); this.lblOrderNO.InnerText = prepayM.guid; // KeyID.ToString(); this.lblPrice.InnerText = prepayM.price.ToString("0.00");; string username = this.UserName; string strWhere = string.Empty; if (this.DisID != 0) { strWhere += " DisID = '" + this.DisID + "' "; } else { JScript.AlertMsgOne(this, "操作员没有对应的代理商!", JScript.IconOption.错误); return; } strWhere += " and Start = 1 and vdef6 = 0 and isnull(dr,0)=0"; List <Hi.Model.PAY_FastPayMent> fastList = new Hi.BLL.PAY_FastPayMent().GetList("", strWhere, ""); this.rptQpay.DataSource = fastList; this.rptQpay.DataBind(); List <Hi.Model.PAY_BankInfo> BankL = new Hi.BLL.PAY_BankInfo().GetList("", " vdef1=0", ""); this.rptOtherBank.DataSource = BankL; this.rptOtherBank.DataBind(); }
/// <summary> /// 新增 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void SubOk_Click(object sender, EventArgs e) { int Id = Convert.ToInt32(Request["Selectbank"]); Hi.Model.PAY_BankInfo bankModel = new Hi.BLL.PAY_BankInfo().GetModel(Id); string code = string.Empty; string name = string.Empty; //Response.Redirect("StockOutAdd.aspx?Id=" + Id); if (bankModel == null) { JScript.AlertAndRedirect("请选择银行!", "PaySelectBank.aspx"); return; } else { code = bankModel.BankCode; name = bankModel.BankName; } this.ScriptManage.InnerHtml = string.Format("<script>doSelectMaterials('{0}','{1}');</script>", code, name); }
public void Bind() { orderModel = new Hi.BLL.DIS_Order().GetModel(KeyID); // 订单检查 if (orderModel == null) { //if (orderModel.Otype == (int)Enums.OType.推送账单) // JScript.AlertMethod(this, "无效的账单!", JScript.IconOption.错误, "function (){ location.replace('" + ("orderDzfzdList.aspx") + "'); }"); //else JScript.AlertMethod(this, "无效的订单!", JScript.IconOption.错误, "function (){ location.replace('" + ("orderPayList.aspx") + "'); }"); //this.lblPayError.InnerText = "无效的订单!"; return; } // 状态检查 if (!( ( (orderModel.Otype == (int)Enums.OType.销售订单 && (orderModel.OState == (int)Enums.OrderState.已审 || orderModel.OState == (int)Enums.OrderState.已发货 || orderModel.OState == (int)Enums.OrderState.已到货) && (orderModel.PayState == (int)Enums.PayState.未支付 || orderModel.PayState == (int)Enums.PayState.部分支付)) || (orderModel.Otype == (int)Enums.OType.推送账单 && orderModel.OState == (int)Enums.OrderState.已审 && (orderModel.PayState == (int)Enums.PayState.部分支付 || orderModel.PayState == (int)Enums.PayState.未支付)) ) && orderModel.OState != (int)Enums.OrderState.已作废)) { if (orderModel.Otype == (int)Enums.OType.推送账单) { JScript.AlertMethod(this, "账单异常,不能支付!", JScript.IconOption.错误, "function (){ location.replace('" + ("orderDzfzdList.aspx") + "'); }"); } else { JScript.AlertMethod(this, "订单异常,不能支付!", JScript.IconOption.错误, "function (){ location.replace('" + ("orderPayList.aspx") + "'); }"); } return; } // 审核状态 if (orderModel.OState < 2) { JScript.AlertMethod(this, "该订单未审核,不能支付!", JScript.IconOption.错误, "function (){ location.replace('" + ("../neworder/orderdetail.aspx?KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey)) + "'); }"); return; } // 支付状态检查 if (orderModel.PayState != (int)Enums.PayState.未支付 && orderModel.PayState != (int)Enums.PayState.部分支付) { Response.Redirect("Error.aspx?type=" + Common.DesEncrypt("1", Common.EncryptKey) + "&KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey)); return; } // 开销户 List <Hi.Model.PAY_OpenAccount> LOpen = new Hi.BLL.PAY_OpenAccount().GetList("", "DisID=" + this.DisID + " and State=1 and isnull(dr,0)=0", ""); // 提现户 List <Hi.Model.PAY_Withdrawals> Lwith = new Hi.BLL.PAY_Withdrawals().GetList("", "DisID=" + this.DisID + " and state=1 and isnull(dr,0)=0", ""); if (LOpen.Count > 0 && Lwith.Count > 0) { String msghd_rspcode = ""; String msghd_rspmsg = ""; String amt_balamt = ""; String msghd_rspcode1 = ""; String msghd_rspmsg1 = ""; String credit_nousedamt = ""; String Json = ""; String Json1 = ""; try { IPubnetwk ipu = new IPubnetwk(); Json = ipu.trd13010("{\"msghd_trdt\":\"" + DateTime.Now.ToString("yyyyMMdd") + "\",\"srl_ptnsrl\":\"" + Common.Number_repeat("") + "\",\"cltacc_cltno\":\"" + LOpen[0].AccNumver + "\",\"cltacc_cltnm\":\"" + LOpen[0].AccName + "\",\"bkacc_accno\":\"" + Lwith[0].AccNm + "\",\"bkacc_accnm\":\"" + LOpen[0].AccName + "\"}"); Json1 = ipu.trd70000("{\"msghd_trdt\":\"" + DateTime.Now.ToString("yyyyMMdd") + "\",\"srl_ptnsrl\":\"" + Common.Number_repeat("") + "\",\"cltacc_cltno\":\"" + LOpen[0].AccNumver + "\",\"cltacc_cltnm\":\"" + LOpen[0].AccName + "\"}"); } catch { } try { JsonData Params = JsonMapper.ToObject(Json); msghd_rspcode = Params["msghd_rspcode"].ToString(); msghd_rspmsg = Params["msghd_rspmsg"].ToString(); amt_balamt = Params["amt_balamt"].ToString(); this.lblBalance1.InnerHtml = (Convert.ToDecimal(amt_balamt) / 100).ToString("N2"); JsonData Params1 = JsonMapper.ToObject(Json1); msghd_rspcode1 = Params1["msghd_rspcode"].ToString(); msghd_rspmsg1 = Params1["msghd_rspmsg"].ToString(); credit_nousedamt = Params1["credit_nousedamt"].ToString(); this.lblBalance3.InnerHtml = (Convert.ToDecimal(credit_nousedamt) / 100).ToString("N2"); } catch { } } // 在线融资记录 PList = new Hi.BLL.PAY_Financing().GetList("", "DisID=" + this.DisID + " and OrderID=" + KeyID + " and State=3 and isnull(dr,0)=0", ""); if (PList.Count > 0) { this.lblBalance5.InnerHtml = PList[0].AclAmt.ToString("0.00"); } decimal payPrice = orderModel.AuditAmount + orderModel.OtherAmount - orderModel.PayedAmount; this.lblOrderNO.InnerText = orderModel.ReceiptNo.Trim().ToString(); //账单支付链接 if (orderModel.Otype == 9) // 推送账单 { this.lblOrderNO.HRef = "../OrderZDInfo.aspx?KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey); } else { this.lblOrderNO.HRef = "../neworder/orderdetail.aspx?KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey); } this.hidOrderid.Value = KeyID.ToString(); this.lblPricePay.InnerText = payPrice.ToString("0.00"); this.hidPricePay.Value = payPrice.ToString("0.00"); this.lblPriceO.InnerText = (orderModel.AuditAmount + orderModel.OtherAmount).ToString("0.00"); if (this.txtPayOrder.Value == "") { this.txtPayOrder.Value = payPrice.ToString("0.00"); } else { this.txtPayOrder.Value = Convert.ToDecimal(this.txtPayOrder.Value).ToString("0.00"); } this.hidUserName.Value = this.UserName; decimal sumPrice = new Hi.BLL.PAY_PrePayment().sums(orderModel.DisID, orderModel.CompID); this.lblSumPrice.InnerText = sumPrice.ToString("0.00"); this.hidSumPrice.Value = sumPrice.ToString("0.00"); string strWhere = " 1=1 "; if (this.DisID != 0) { strWhere += " and DisID = " + this.DisID; } strWhere += " and Start = 1 and vdef6 = 0 and isnull(dr,0)=0"; List <Hi.Model.PAY_FastPayMent> fastList = new Hi.BLL.PAY_FastPayMent().GetList("", strWhere, ""); this.rptQpay.DataSource = fastList; this.rptQpay.DataBind(); List <Hi.Model.PAY_BankInfo> BankL = new Hi.BLL.PAY_BankInfo().GetList("", " vdef1=0", ""); this.rptOtherBank.DataSource = BankL; this.rptOtherBank.DataBind(); }
public void Bind() { Hi.Model.Pay_Service service = new Hi.BLL.Pay_Service().GetModel(KeyID); Price = service.Price; //orderModel = new Hi.BLL.DIS_Order().GetModel(KeyID); //decimal payPrice = orderModel.AuditAmount + orderModel.OtherAmount - orderModel.PayedAmount; //this.lblOrderNO.InnerText = orderModel.ReceiptNo.Trim().ToString(); ////账单支付链接 //if (orderModel.Otype == 9) // this.lblOrderNO.HRef = "../OrderZDInfo.aspx?KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey); //else //this.lblOrderNO.HRef = "../neworder/orderdetail.aspx?KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey); string outdata;//服务起始日期 //List<Hi.Model.Pay_Service> serviceord = new Hi.BLL.Pay_Service().GetList("*", " compid=" + this.CompID + " and isaudit=1 and outofdata=0 ", " createdate desc"); //if (serviceord.Count > 0) //{ // outdata = serviceord[0].OutData.ToString("yyyy-MM-dd");//存在有效服务 获取购买服务起始日期 //} //else //{ // string CreateDate = string.Empty; // //获取购买服务的起始日期 // Common.GetCompService(CompID.ToString(),out outdata); // if (outdata=="0") // { // outdata = DateTime.Now.ToString("yyyy-MM-dd"); // } //} Hi.Model.BD_Company comp = new Hi.BLL.BD_Company().GetModel(Convert.ToInt32(CompID)); if (comp.EnabledEndDate.ToString() == "0001/1/1 0:00:00") { //没有任何服务记录 if (service.ServiceType == 1) { outdata = Convert.ToDateTime(service.OutData).AddYears(-1).ToString(); } else { outdata = Convert.ToDateTime(service.OutData).AddMonths(-1).ToString(); } } else if (comp.EnabledEndDate < DateTime.Now.AddDays(1)) { //服务已过期 if (service.ServiceType == 1) { outdata = Convert.ToDateTime(service.OutData).AddYears(-1).ToString(); } else { outdata = Convert.ToDateTime(service.OutData).AddMonths(-1).ToString(); } } else { //服务日期有效 if (service.ServiceType == 1) { outdata = Convert.ToDateTime(service.OutData).AddYears(-1).AddDays(1).ToString(); } else { outdata = Convert.ToDateTime(service.OutData).AddMonths(-1).AddDays(1).ToString(); } } Data.InnerHtml = Convert.ToDateTime(outdata).ToString("yyyy-MM-dd"); DataEnd.InnerHtml = service.OutData.ToString("yyyy-MM-dd"); this.hidOrderid.Value = KeyID.ToString(); //this.lblPricePay.InnerText = service.Price.ToString("0.00"); this.hidPricePay.Value = service.Price.ToString("0.00"); //this.lblPriceO.InnerText = service.Price.ToString("0.00"); if (this.txtPayOrder.Value == "") { this.txtPayOrder.Value = service.Price.ToString("0.00"); } else { this.txtPayOrder.Value = Convert.ToDecimal(this.txtPayOrder.Value).ToString("0.00"); } this.hidUserName.Value = this.UserName; //decimal sumPrice = new Hi.BLL.PAY_PrePayment().sums(orderModel.DisID, orderModel.CompID); //this.lblSumPrice.InnerText = sumPrice.ToString("0.00"); this.hidSumPrice.Value = service.Price.ToString("0.00"); //string strWhere = " 1=1 "; //if (this.DisID != 0) //{ // strWhere += " and DisID = " + this.DisID; //} //strWhere += " and Start = 1 and vdef6 = 0 and isnull(dr,0)=0"; //List<Hi.Model.PAY_FastPayMent> fastList = new Hi.BLL.PAY_FastPayMent().GetList("", strWhere, ""); //this.rptQpay.DataSource = fastList; //this.rptQpay.DataBind(); List <Hi.Model.PAY_BankInfo> BankL = new Hi.BLL.PAY_BankInfo().GetList("", " vdef1=0", ""); this.rptOtherBank.DataSource = BankL; this.rptOtherBank.DataBind(); }