예제 #1
0
파일: Pay.aspx.cs 프로젝트: kkwkk/ybyzt
    protected void btnPayFailure_Click(object sender, EventArgs e)
    {
        List <Hi.Model.PAY_Financing> PList = new Hi.BLL.PAY_Financing().GetList("", "DisID=" + this.DisID + " and OrderID=" + KeyID + " and Type=4 and State in (1,3) and isnull(dr,0)=0", "");

        if (PList != null && PList.Count > 0)
        {
            if (orderModel.Otype != 9)
            {
                Response.Redirect("orderPayList.aspx");
            }
            else
            {
                Response.Redirect("orderDzfzdList.aspx");
            }
        }
        else
        {
            if (orderModel.Otype != 9)
            {
                Response.Redirect("../neworder/orderdetail.aspx?KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey) + "&type1=orderpaylist");
            }
            else
            {
                this.
                Response.Redirect("../neworder/orderdetail.aspx?KeyID=" + Common.DesEncrypt(KeyID.ToString(), Common.EncryptKey) + "&type1=orderZDList");
            }
        }
    }
예제 #2
0
    public void Bind()
    {
        int    pageCount = 0;
        int    Counts    = 0;
        string strwhere  = string.Empty;

        if (ViewState["strwhere"] != null)
        {
            strwhere += ViewState["strwhere"].ToString();
        }
        strwhere += " and State = 1 and type=2 and isnull(dr,0)=0 and DisID=0 and CompID=" + CompID;  //and PayState in (0,2,7)

        if (this.txtPager.Value.Trim().ToString() != "")
        {
            if (this.txtPager.Value.Trim().Length < 4)
            {
                Pager.PageSize = int.Parse(this.txtPager.Value.Trim());
            }
            else
            {
                this.txtPager.Value = "100";
                Pager.PageSize      = 100;
            }
        }


        List <Hi.Model.PAY_Financing> Financing = new Hi.BLL.PAY_Financing().GetList(Pager.PageSize, Pager.CurrentPageIndex, "ts", true, strwhere, out pageCount, out Counts);

        this.repfinan.DataSource = Financing;
        this.repfinan.DataBind();
        Pager.RecordCount = Counts;
        page = Pager.CurrentPageIndex.ToString();
    }
예제 #3
0
파일: Pay.aspx.cs 프로젝트: kkwkk/ybyzt
    protected void btnFailure_Click(object sender, EventArgs e)
    {
        List <Hi.Model.PAY_Financing> PList = new Hi.BLL.PAY_Financing().GetList("", "DisID=" + this.DisID + " and OrderID=" + KeyID + " and Type=4 and State in (1,3) and isnull(dr,0)=0", "");

        if (PList != null && PList.Count > 0)
        {
            Response.Redirect("../../Financing/FinancingDetailList.aspx");
        }
        else
        {
            if (orderModel.Otype != 9)
            {
                Response.Redirect("orderPayList.aspx");
            }
            else
            {
                Response.Redirect("orderDzfzdList.aspx");
            }
        }
    }
예제 #4
0
    public void Bind()
    {
        decimal price = 0;

        Hi.Model.DIS_Order     orderM = new Hi.BLL.DIS_Order().GetModel(KeyID);
        Hi.Model.PAY_Payment   payM   = new Hi.BLL.PAY_Payment().GetModel(Pid);
        Hi.Model.PAY_Financing FinM   = new Hi.BLL.PAY_Financing().GetModel(Fid);
        if (payM != null)
        {
            price += payM.PayPrice;
        }
        Hi.Model.PAY_PrePayment prepayM = new Hi.BLL.PAY_PrePayment().GetModel(PPid);
        if (prepayM != null)
        {
            price += prepayM.price * -1;
        }
        if (FinM != null)
        {
            price += FinM.AclAmt;
        }
        this.PayedAmount.InnerHtml = price.ToString("0.00");
    }
예제 #5
0
    protected void btn_save(object sender, EventArgs e)
    {
        string guid = Common.Number_repeat("1");

        Hi.Model.PAY_Financing Fin = new Hi.Model.PAY_Financing();
        Fin.DisID  = dis.ID;
        Fin.CompID = dis.CompID;
        Fin.State  = 2;
        List <Hi.Model.PAY_OpenAccount> LOpen = new Hi.BLL.PAY_OpenAccount().GetList("", "DisID=" + Fin.DisID + " and State=1 and dr=0", "");

        if (LOpen.Count > 0)
        {
            Fin.OpenAccID = LOpen[0].ID;
        }
        else
        {
            this.lblErr.InnerHtml = "请先添加开销账户!";
            return;
        }
        Fin.OrderID    = 0;
        Fin.AclAmt     = Convert.ToDecimal(txtPrice.Value);
        Fin.Guid       = guid;
        Fin.Type       = 2;
        Fin.CcyCd      = "CNY";
        Fin.vdef1      = txtRemark.Value;
        Fin.ts         = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd"));
        Fin.modifyuser = this.UserID;
        List <Hi.Model.PAY_Withdrawals> Lwith = new Hi.BLL.PAY_Withdrawals().GetList("", "DisID=" + Fin.DisID + " and state=1 and isnull(dr,0)=0", "");

        if (Lwith.Count == 0)
        {
            this.lblErr.InnerHtml = "请先维护结算账户!";
            return;
        }
        if (Util.md5(txtPayPwd.Value.Trim()) != dis.Paypwd)
        {
            this.lblErr.InnerHtml = "支付密码错误!";
            return;
        }
        int result = 0;

        result = new Hi.BLL.PAY_Financing().Add(Fin);
        if (result > 0)
        {
            String msghd_rspcode = "";
            String msghd_rspmsg  = "";
            String Json          = "";
            try
            {
                IPubnetwk ipu = new IPubnetwk();
                Json = ipu.trd16000("{\"msghd_trdt\":\"" + DateTime.Now.ToString("yyyyMMdd") + "\",\"srl_ptnsrl\":\"" + guid + "\",\"cltacc_cltno\":\"" + LOpen[0].AccNumver + "\",\"cltacc_cltnm\":\"" + LOpen[0].AccName + "\",\"amt_aclamt\":\"" + (int)(Convert.ToDecimal(txtPrice.Value) * 100) + "\"}");
            }
            catch
            {
                this.lblErr.InnerHtml = "接口连接失败!";
                return;
            }
            try
            {
                JsonData Params = JsonMapper.ToObject(Json);
                msghd_rspcode = Params["msghd_rspcode"].ToString();
                msghd_rspmsg  = Params["msghd_rspmsg"].ToString();
            }
            catch { }
            if ("000000".Equals(msghd_rspcode))
            {
                try
                {
                    Hi.Model.PAY_Financing finaM = new Hi.BLL.PAY_Financing().GetModel(result);
                    finaM.State = 1;
                    finaM.ts    = DateTime.Now;
                    new Hi.BLL.PAY_Financing().Update(finaM);
                }
                catch { }
                Response.Redirect("FinancingDetailList.aspx");
            }
            else
            {
                this.lblErr.InnerHtml = msghd_rspmsg;
                return;
            }
        }
    }