コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ViewState["MS"] = Request.QueryString["MS"].ToString();
            if (ViewState["MS"].ToString() == "N")
            {
                ViewState["PRD"]     = Request.QueryString["PRD"].ToString();
                ViewState["ACC"]     = Request.QueryString["FD"].ToString();
                ViewState["FDTP"]    = Request.QueryString["FDP"].ToString();
                ViewState["TPAY"]    = Request.QueryString["TPAMT"].ToString();
                ViewState["CT"]      = Request.QueryString["CT"].ToString();
                ViewState["DAMT"]    = Request.QueryString["DAMT"].ToString();
                ViewState["ACCTYPE"] = Request.QueryString["ACCT"].ToString();
                ViewState["INTPAY"]  = Request.QueryString["INTPAY"].ToString();
                ViewState["IR"]      = Request.QueryString["IR"].ToString();
                ViewState["OPRTYPE"] = Request.QueryString["OPRTYPE"].ToString();
                ViewState["REFID"]   = Request.QueryString["REFID"].ToString();

                //Admin Fee
                ViewState["AFEE"]   = Request.QueryString["ADFEE"].ToString();
                ViewState["ADSBGL"] = Request.QueryString["ADSBGL"].ToString();

                //Commision
                ViewState["COMMCHG"]  = Request.QueryString["COMMCHG"].ToString();
                ViewState["COMMSBGL"] = Request.QueryString["COMMSBGL"].ToString();

                ViewState["GLC"] = Request.QueryString["GLC"].ToString();

                TxtACPayAmount.Text = ViewState["TPAY"].ToString();
                BD.BindIntrstPayout(ddlIntrestPay);
                BD.BindWithReceipt(ddlPayType, "1");
                // dtDeposDate.Text = Session["EntryDate"].ToString();
                AutoWRPRD.ContextKey = Session["BRCD"].ToString();
                Autoprd4.ContextKey  = Session["BRCD"].ToString();
                BD.BindDepositGL(ddlProductType, "5", Session["BRCD"].ToString());
                int RC = FDR.CreateTable("X_" + Session["MID"].ToString().Trim(), Session["BRCD"].ToString());


                double PrnAmt = Convert.ToDouble(ViewState["TPAY"].ToString()) - Convert.ToDouble(ViewState["INTPAY"].ToString());
                RC = FDR.InsertTemp(ViewState["GLC"].ToString(), ViewState["FDTP"].ToString(), ViewState["ACC"].ToString(), PrnAmt.ToString(), "2", ViewState["CT"].ToString(), "X_" + Session["MID"].ToString(), "7", "TR");
                RC = FDR.InsertTemp(ViewState["GLC"].ToString(), ViewState["FDTP"].ToString(), ViewState["ACC"].ToString(), PrnAmt.ToString(), "2", ViewState["CT"].ToString(), "X_" + Session["MID"].ToString(), "7", "TR");
                //Result = FDR.InsertTempNew("10", ViewState["IR"].ToString(), "9999", ViewState["INTPAY"].ToString(), "1", ViewState["CT"].ToString(), Session["UserName"].ToString(), TxtRate.Text, ddlduration.SelectedValue, TxtPeriod.Text, TxtIntrest.Text, DtDueDate.Text, TxtMaturity.Text, TxtProcode4.Text, TxtAccNo4.Text);
                if (ViewState["INTPAY"].ToString() != "0")
                {
                    RC = FDR.InsertTemp("10", ViewState["IR"].ToString(), ViewState["ACC"].ToString(), ViewState["INTPAY"].ToString(), "2", ViewState["CT"].ToString(), "X_" + Session["MID"].ToString(), "7", "TR");
                }

                if (ViewState["AFEE"].ToString() != "0")
                {
                    RC = FDR.InsertTemp("100", ViewState["ADSBGL"].ToString(), ViewState["ACC"].ToString(), ViewState["AFEE"].ToString(), "1", ViewState["CT"].ToString(), "X_" + Session["MID"].ToString());
                    RC = FDR.InsertTemp(ViewState["GLC"].ToString(), ViewState["FDTP"].ToString(), ViewState["ACC"].ToString(), ViewState["AFEE"].ToString(), "2", ViewState["CT"].ToString(), "X_" + Session["MID"].ToString());
                    if (ViewState["COMMCHG"].ToString() != "0")
                    {
                        RC = FDR.InsertTemp("100", ViewState["COMMSBGL"].ToString(), ViewState["ACC"].ToString(), ViewState["COMMCHG"].ToString(), "1", ViewState["CT"].ToString(), "X_" + Session["MID"].ToString());
                        RC = FDR.InsertTemp(ViewState["GLC"].ToString(), ViewState["FDTP"].ToString(), ViewState["ACC"].ToString(), ViewState["COMMCHG"].ToString(), "2", ViewState["CT"].ToString(), "X_" + Session["MID"].ToString());
                    }
                }
                BindGrid();
            }
            else
            {
                ViewState["TPAY"]    = Request.QueryString["TPAMT"].ToString();
                ViewState["ACCTYPE"] = Request.QueryString["ACCT"].ToString();
                ViewState["CT"]      = Request.QueryString["CT"].ToString();
                ViewState["MSETNO"]  = Request.QueryString["SNO"].ToString();
                ViewState["OPRTYPE"] = Request.QueryString["OPR"].ToString();
                TxtACPayAmount.Text  = ViewState["TPAY"].ToString();

                BD.BindIntrstPayout(ddlIntrestPay);
                BD.BindWithReceipt(ddlPayType, "1");
                // dtDeposDate.Text = Session["EntryDate"].ToString();
                AutoWRPRD.ContextKey = Session["BRCD"].ToString();
                Autoprd4.ContextKey  = Session["BRCD"].ToString();
                BD.BindDepositGL(ddlProductType, "5", Session["BRCD"].ToString());
                int RC = FDR.CreateTable("X_" + Session["MID"].ToString().Trim(), Session["BRCD"].ToString());

                RC = FDR.InsertTempMultiple("IMULTIPLEDR", Session["BRCD"].ToString(), Session["EntryDate"].ToString(), ViewState["MSETNO"].ToString(), "X_" + Session["MID"].ToString());
            }
        }
    }