예제 #1
0
    protected void TxtProName4_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   custno = TxtProName4.Text;
            string[] CT     = custno.Split('_');
            if (CT.Length > 0)
            {
                TxtProName4.Text = CT[0].ToString();
                TxtProcode4.Text = CT[1].ToString();
                //TxtGLCD.Text = CT[2].ToString();
                string[] GLS = BD.GetAccTypeGL(TxtProcode4.Text, Session["BRCD"].ToString()).Split('_');
                ViewState["TGL"]        = GLS[1].ToString();
                Autoaccname4.ContextKey = Session["BRCD"].ToString() + "_" + TxtProcode4.Text + "_" + ViewState["TGL"].ToString();

                int GL = 0;
                int.TryParse(ViewState["TGL"].ToString(), out GL);

                if (TxtProName4.Text == "")
                {
                    WebMsgBox.Show("Please enter valid Product code", this.Page);
                    TxtProcode4.Text = "";
                    TxtProcode4.Focus();
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
예제 #2
0
 protected void TxtProcode4_TextChanged(object sender, EventArgs e)
 {
     try
     {
         TxtProName4.Text = CMN.GetAllProductName(Convert.ToInt32(TxtProcode4.Text), Session["BRCD"].ToString());
         if (TxtProName4.Text.ToString() == "")
         {
             WebMsgBox.Show("Product code not present", this.Page);
             TxtProcode4.Text = "";
             TxtProcode4.Focus();
         }
         else
         {
             TxtAccNo4.Focus();
         }
     }
     catch (Exception Ex)
     {
         ExceptionLogging.SendErrorToText(Ex);
     }
 }
예제 #3
0
    protected void BtnSubmit_Click(object sender, EventArgs e)
    {
        try
        {
            string STR = MT.GetDepositCat(Session["BRCD"].ToString(), TxtProcode.Text, "MISTRF");
            if (STR == "MIS" && (TxtProcode4.Text == "" || TxtAccNo4.Text == ""))
            {
                WebMsgBox.Show("Enter Transfer Account for MIS Deposit...!", this.Page);
                TxtProcode4.Text = "";
                TxtProcode4.Focus();
            }
            else
            {
                Result = FDR.InsertTempNew("5", TxtProcode.Text, "9999", TxtDepoAmt.Text, "1", ViewState["CT"].ToString(), "X_" + Session["MID"].ToString(), TxtRate.Text, ddlduration.SelectedValue, TxtPeriod.Text, TxtIntrest.Text, DtDueDate.Text, TxtMaturity.Text, TxtProcode4.Text, TxtAccNo4.Text, ddlIntrestPay.SelectedValue, dtDeposDate.Text, string.IsNullOrEmpty(TxtReceiptNo.Text) ? "0" : TxtReceiptNo.Text, ViewState["OPRTYPE"].ToString(), ViewState["ACCTYPE"].ToString());

                double US = Convert.ToDouble(FDR.GetCurrentBalance("X_" + Session["MID"].ToString(), "Y"));

                TxtDiff.Text = US.ToString();

                BindGrid();

                double AC = Convert.ToDouble(TxtAMTCOLL.Text);
                double RM = Convert.ToDouble(TxtDiff.Text);
                if (RM != 0)
                {
                    if (ViewState["MS"].ToString() == "N")
                    {
                        PostEntry.Visible       = false;
                        BtnPostMultiple.Visible = false;
                        BtnSubmit.Visible       = true;
                    }
                    else
                    {
                        BtnPostMultiple.Visible = false;
                        PostEntry.Visible       = false;
                        BtnSubmit.Visible       = true;
                        if (rdbMultiple.Checked == true)
                        {
                            ClearData();
                        }
                    }
                }
                else if (RM == 0)
                {
                    if (ViewState["MS"].ToString() == "N")
                    {
                        BtnPostMultiple.Visible = false;
                        PostEntry.Visible       = true;
                        BtnSubmit.Visible       = false;
                        ClearData();
                    }
                    else
                    {
                        BtnPostMultiple.Visible = true;
                        PostEntry.Visible       = false;
                        BtnSubmit.Visible       = false;
                        if (rdbMultiple.Checked == true)
                        {
                            ClearData();
                        }
                    }
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }