protected void bt_OK_Click(object sender, EventArgs e)
    {
        int     tradeclient = 0, agentstaff = 0, paymode = 0;
        decimal amount = 0;

        tradeclient = (int)Session["BalanceTradeClient"];
        int.TryParse(ddl_AgentStaff.SelectedValue, out agentstaff);
        int.TryParse(ddl_PayMode.SelectedValue, out paymode);
        decimal.TryParse(tbx_Amount.Text, out amount);

        if (tradeclient == 0)
        {
            MessageBox.Show(this, "请选择收款客户!");
            return;
        }

        if (agentstaff == 0)
        {
            MessageBox.Show(this, "请选择收款经办人!");
            return;
        }

        if (paymode == 0)
        {
            MessageBox.Show(this, "请选择收款方式!");
            return;
        }

        if (amount == 0)
        {
            MessageBox.Show(this, "请选择收款金额!");
            return;
        }
        int ret = 0;

        if (paymode == 11)
        {
            ret = AC_BalanceUsageListBLL.BalanceAR((int)Session["OwnerClient"], tradeclient,
                                                   agentstaff, amount, tbx_Remark.Text, (string)Session["BalanceARIDs"]);
        }
        else
        {
            ret = AC_CashFlowListBLL.Receipt_BalanceAR((int)Session["OwnerClient"], tradeclient,
                                                       agentstaff, paymode, amount, tbx_Remark.Text, (int)Session["UserID"], 0, (string)Session["BalanceARIDs"]);
        }

        if (ret < 0)
        {
            MessageBox.Show(this, "结款失败!Ret=" + ret.ToString());
            return;
        }
        else
        {
            Session["BalanceARIDs"]       = null;
            Session["BalanceTradeClient"] = null;

            Response.Redirect("ARList.aspx?TradeClient=" + tradeclient.ToString());
        }
    }
Beispiel #2
0
        public CashFlowInfo(int id)
        {
            AC_CashFlowList m = new AC_CashFlowListBLL(id).Model;

            if (m != null)
            {
                FillModel(m);
            }
        }
    private void BindData()
    {
        AC_CashFlowList m = new AC_CashFlowListBLL((int)ViewState["ID"]).Model;

        if (m != null)
        {
            pl_detail.BindData(m);
        }
    }
Beispiel #4
0
    protected void bt_OK_Click(object sender, EventArgs e)
    {
        int     tradeclient = 0, agentstaff = 0, paymode = 0;
        decimal amount = 0;

        int.TryParse(select_Client.SelectValue, out tradeclient);
        int.TryParse(ddl_AgentStaff.SelectedValue, out agentstaff);
        int.TryParse(ddl_PayMode.SelectedValue, out paymode);
        decimal.TryParse(tbx_Amount.Text, out amount);

        if (tradeclient == 0)
        {
            MessageBox.Show(this, "请选择收款客户!");
            return;
        }

        if (agentstaff == 0)
        {
            MessageBox.Show(this, "请选择收款经办人!");
            return;
        }

        if (paymode == 0)
        {
            MessageBox.Show(this, "请选择收款方式!");
            return;
        }

        if (amount == 0)
        {
            MessageBox.Show(this, "请选择收款金额!");
            return;
        }

        int ret = AC_CashFlowListBLL.Receipt_PreReceived((int)Session["OwnerClient"], tradeclient, agentstaff, paymode, amount, 0, tbx_Remark.Text, (int)Session["UserID"], 0);

        if (ret < 0)
        {
            MessageBox.Show(this, "收款失败!Ret=" + ret.ToString());
            return;
        }
        else
        {
            Response.Redirect("CashFlowList.aspx?Classify=1&TradeClient=" + tradeclient.ToString());
        }
    }
 public CashFlowInfo(int id)
 {
     AC_CashFlowList m = new AC_CashFlowListBLL(id).Model;
     if (m != null) FillModel(m);
 }
 private void BindData()
 {
     AC_CashFlowList m = new AC_CashFlowListBLL((int)ViewState["ID"]).Model;
     if (m != null) pl_detail.BindData(m);
 }