예제 #1
0
    protected void TxtAmount_TextChanged(object sender, EventArgs e)
    {
        try
        {
            if (DdlCRDR.SelectedValue == "2")
            {
                if (ddlPMTMode.SelectedValue != "3")
                {
                    double BAL    = Convert.ToDouble(TxtBalance.Text.Trim().ToString() == "" ? "0" : TxtBalance.Text.Trim().ToString());
                    double curbal = Convert.ToDouble(TxtAmount.Text.Trim().ToString() == "" ? "0" : TxtAmount.Text.Trim().ToString());

                    if ((Convert.ToInt32(ViewState["GlCode"].ToString()) < 100) && Convert.ToInt32(ViewState["GlCode"].ToString()) != 3)
                    {
                        if (curbal > BAL)
                        {
                            lblMessage.Text = "Insufficient Account Balance...!!";
                            TxtAmount.Text  = "";
                            TxtAmount.Focus();
                            ModalPopup.Show(this.Page);
                            return;
                        }
                    }
                }
            }

            Submit.Focus();
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
예제 #2
0
    protected void Txtdiv3_TextChanged(object sender, EventArgs e)
    {
        try
        {
            AC1 = SP.Getaccno(Txtdiv3.Text, Session["BRCD"].ToString());

            if (AC1 != null)
            {
                string[] AC = AC1.Split('_');;
                Txtdiv3name.Text = AC[1].ToString();

                Submit.Focus();
                return;
            }
            else
            {
                Txtdiv3.Text     = "";
                Txtdiv3name.Text = "";
                lblMessage.Text  = "Enter valid Product code...!!";
                ModalPopup.Show(this.Page);
                Txtdiv3.Focus();
                return;
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
예제 #3
0
    protected void Txtdiv3name_TextChanged(object sender, EventArgs e)
    {
        try
        {
            CUNAME = Txtdiv3name.Text;
            string[] custnob = CUNAME.Split('_');
            if (custnob.Length > 1)
            {
                Txtdiv3name.Text = custnob[0].ToString();
                Txtdiv3.Text     = (string.IsNullOrEmpty(custnob[1].ToString()) ? "" : custnob[1].ToString());

                Submit.Focus();
                return;
            }
            else
            {
                Txtdiv3.Text     = "";
                Txtdiv3name.Text = "";
                lblMessage.Text  = "Enter valid Product code...!!";
                ModalPopup.Show(this.Page);
                Txtdiv3.Focus();
                return;
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
    protected void txtnewCustNo_TextChanged(object sender, EventArgs e)
    {
        string AT = "";

        AT = CLS.Getstage1(txtCustNo.Text, Session["BRCD"].ToString());
        if (AT != "1003")
        {
            lblMessage.Text = "Sorry Customer not Authorise.........!!";
            ModalPopup.Show(this.Page);
            txtnewCustNo.Focus();
        }
        else
        {
            string CUSTNAME = CLS.GetCustNAme(txtnewCustNo.Text, Session["BRCD"].ToString());
            if (CUSTNAME != null || CUSTNAME != "")
            {
                txtnewcustname.Text = CUSTNAME;
                Submit.Focus();
            }
            else
            {
                lblMessage.Text = "Cust No Not Exit In Master   ...!!!";
                ModalPopup.Show(this.Page);
                return;
            }
        }
    }
예제 #5
0
 private void form4_Load(object sender, EventArgs e)
 {
     name.Hide();
     contact.Hide();
     password.Hide();
     password2.Hide();
     address.Hide();
     gender.Hide();
     mail.Hide();
     date.Hide();
     comboBox1.Items.Clear();
     comboBox1.Items.Add("Select One");
     comboBox1.SelectedIndex      = 0;
     dateTimePicker1.Format       = DateTimePickerFormat.Custom;
     dateTimePicker1.CustomFormat = "ddd   dd, MMMM, yyyy";
     dateTimePicker1.Value        = DateTime.Now;
     Submit.Focus();
 }
예제 #6
0
        private void StartToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Log.Text       = "";
            Submit.Visible = true;
            Submit.Focus();
            StartToolStripMenuItem.Enabled   = false;
            RestartToolStripMenuItem.Enabled = true;
            ExitToolStripMenuItem.Enabled    = true;

            for (int i = 3; i >= 1; i--)
            {
                ShowText.Text = i.ToString();
                Delay(1000);
            }
            int[] Lvl = new int[10];
            int   pos = 0;

            Count           = 0;
            Over            = false;
            Submit.Text     = "";
            Submit.ReadOnly = false;
            CorrectCount    = WrongCount = 0;
            Correct.Text    = string.Format("正确: {0:D}", CorrectCount);
            Wrong.Text      = string.Format("错误: {0:D}", WrongCount);
            if (HiraganaToolStripMenuItem.Checked)
            {
                Lvl[pos++] = 0;
            }
            if (KatakanaToolStripMenuItem.Checked)
            {
                Lvl[pos++] = 1;
            }
            if (VoicedHiraToolStripMenuItem.Checked)
            {
                Lvl[pos++] = 2;
            }
            if (VoicedKataToolStripMenuItem.Checked)
            {
                Lvl[pos++] = 3;
            }
            if (AoHiraToolStripMenuItem.Checked)
            {
                Lvl[pos++] = 4;
            }
            if (AoKataToolStripMenuItem.Checked)
            {
                Lvl[pos++] = 5;
            }

            HiraganaToolStripMenuItem.Enabled   = false;
            KatakanaToolStripMenuItem.Enabled   = false;
            VoicedHiraToolStripMenuItem.Enabled = false;
            VoicedKataToolStripMenuItem.Enabled = false;
            AoHiraToolStripMenuItem.Enabled     = false;
            AoKataToolStripMenuItem.Enabled     = false;

            LoadTest(Lvl, pos);
            Log.Visible      = true;
            LogTitle.Visible = true;
            Timer.Visible    = true;
            Schedule.Visible = true;
            Correct.Visible  = true;
            Wrong.Visible    = true;
            DateTime Current = DateTime.Now;

            while (true)
            {
                int seconds = Convert.ToInt32(DateTime.Now.Subtract(Current).TotalSeconds);
                int minutes = seconds / 60;
                Timer.Text = string.Format("{0:D2}:{1:D2}", minutes, seconds % 60);
                Delay(1000);
                if (Over)
                {
                    Submit.ReadOnly = true;
                    break;
                }
            }
            Schedule.Text    = string.Format("正确率: {0:P}", 1.0 * CorrectCount / R.Count);
            ShowText.Text    = "▶";
            ShowText.Enabled = true;
        }
예제 #7
0
    public void callaccnInfo()
    {
        try
        {
            if (ViewState["GLCODE"].ToString() == "1" || ViewState["GLCODE"].ToString() == "2" || ViewState["GLCODE"].ToString() == "5" || ViewState["GLCODE"].ToString() == "8")
            {
                Div_nominee.Visible = true;
            }
            else
            {
                Div_nominee.Visible = false;
            }

            if (ViewState["GLCODE"].ToString() == "3")
            {
                Div_nominee.Visible = false;
                Div_Joint.Visible   = false;
            }

            string   custname, refcustname, agntname;
            string[] name;
            string[] rname;
            string[] aname;
            dt            = accop.GetInfo(ViewState["GLCODE"].ToString(), Session["BRCD"].ToString(), ViewState["ACCNO"].ToString(), ViewState["SUBGLCODE"].ToString());
            dt1           = accop.GetNominiInfo1(Session["BRCD"].ToString(), ViewState["GLCODE"].ToString(), ViewState["SUBGLCODE"].ToString(), "1", ViewState["ACCNO"].ToString());
            dt11          = accop.GetNominiInfo2(Session["BRCD"].ToString(), ViewState["GLCODE"].ToString(), ViewState["SUBGLCODE"].ToString(), "2", ViewState["ACCNO"].ToString());
            dt2           = accop.GetJointinfo1(Session["BRCD"].ToString(), ViewState["GLCODE"].ToString(), ViewState["SUBGLCODE"].ToString(), "1", ViewState["ACCNO"].ToString());
            dt12          = accop.GetJointinfo2(Session["BRCD"].ToString(), ViewState["GLCODE"].ToString(), ViewState["SUBGLCODE"].ToString(), "2", ViewState["ACCNO"].ToString());
            txtodate.Text = Convert.ToDateTime(dt.Rows[0]["OPENINGDATE"]).ToString("dd/MM/yyyy");
            txtmopr.Text  = Convert.ToString(dt.Rows[0]["OPR_TYPE"].ToString());

            DdlModeofOpr.SelectedValue = Convert.ToString(dt.Rows[0]["OPR_TYPE"].ToString());
            if (DdlModeofOpr.SelectedValue == "2")
            {
                Div_Joint.Visible = true;
            }
            else
            {
                Div_Joint.Visible = false;
            }

            txttype.Text             = Convert.ToString(dt.Rows[0]["SUBGLCODE"].ToString());
            txtaccno.Text            = Convert.ToString(dt.Rows[0]["ACCNO"].ToString());
            txtAccType.Text          = Convert.ToString(dt.Rows[0]["Acc_Type"].ToString());
            Ddlacctype.SelectedIndex = Convert.ToInt32(dt.Rows[0]["Acc_Type"].ToString());
            Ddlacctype.SelectedIndex = Convert.ToInt32(txtAccType.Text);
            txtcstno.Text            = Convert.ToString(dt.Rows[0]["CUSTNO"].ToString());
            custname        = accop.Getcustname(txtcstno.Text);
            name            = custname.Split('_');
            TxtAccName.Text = name[0].ToString();

            if ((Convert.ToString(dt.Rows[0]["Ref_custNo"].ToString()) != "0") && (Convert.ToString(dt.Rows[0]["Ref_custNo"].ToString()) != ""))
            {
                Txtrefcustno.Text   = Convert.ToString(dt.Rows[0]["Ref_custNo"].ToString());
                refcustname         = accop.Getcustname(Txtrefcustno.Text);
                rname               = refcustname.Split('_');
                txtrefcustname.Text = rname[0].ToString();
            }
            if ((Convert.ToString(dt.Rows[0]["Ref_Agent"].ToString()) != "0") && (Convert.ToString(dt.Rows[0]["Ref_Agent"].ToString()) != ""))
            {
                TxtAgentNo.Text   = Convert.ToString(dt.Rows[0]["Ref_Agent"].ToString());
                agntname          = accop.GetAgentName(TxtAgentNo.Text, Session["BRCD"].ToString());
                aname             = agntname.Split('_');
                TxtAgentname.Text = aname[0].ToString();
            }
            if (dt1.Rows.Count > 0)
            {
                if (Convert.ToString(dt1.Rows[0]["NOMINEENAME"].ToString()) != "")
                {
                    txtNomName.Text           = Convert.ToString(dt1.Rows[0]["NOMINEENAME"].ToString());
                    ddlRelation.SelectedValue = Convert.ToString(dt1.Rows[0]["RELATION"].ToString());
                    if (dt1.Rows[0]["DOB"].ToString() != "" && Convert.ToDateTime(dt1.Rows[0]["DOB"]).ToString("dd/MM/yyyy") != "01/01/1900") // condition added by abhishek 14-02-2018 Because of exception
                    {
                        txtBithdate.Text = Convert.ToDateTime(dt1.Rows[0]["DOB"]).ToString("dd/MM/yyyy");
                    }
                }
            }
            if (dt11.Rows.Count > 0)
            {
                if (Convert.ToString(dt11.Rows[0]["NOMINEENAME"].ToString()) != "")
                {
                    txtnom2.Text = Convert.ToString(dt11.Rows[0]["NOMINEENAME"].ToString());
                    ddlrelation2.SelectedValue = Convert.ToString(dt11.Rows[0]["RELATION"].ToString());
                    if (dt11.Rows[0]["DOB"].ToString() != "" && Convert.ToDateTime(dt11.Rows[0]["DOB"]).ToString("dd/MM/yyyy") != "01/01/1900") // condition added by abhishek 14-02-2018 Because of exception
                    {
                        txtdob2.Text = Convert.ToDateTime(dt11.Rows[0]["DOB"]).ToString("dd/MM/yyyy");
                    }
                }
            }
            if (dt2.Rows.Count > 0)
            {
                if (Convert.ToString(dt2.Rows[0]["JOINTNAME"].ToString()) != "")
                {
                    txtJointFName.Text        = Convert.ToString(dt2.Rows[0]["JOINTNAME"].ToString());
                    ddlreljoint.SelectedValue = Convert.ToString(dt2.Rows[0]["JOINTRELATION"].ToString());
                    if (dt2.Rows[0]["JOINTDOB"].ToString() != "" && Convert.ToDateTime(dt2.Rows[0]["JOINTDOB"]).ToString("dd/MM/yyyy") != "01/01/1900") // condition added by abhishek 14-02-2018 Because of exception
                    {
                        TxtDOB.Text = Convert.ToDateTime(dt2.Rows[0]["JOINTDOB"]).ToString("dd/MM/yyyy");
                    }
                }
            }
            if (dt12.Rows.Count > 0)
            {
                if (Convert.ToString(dt12.Rows[0]["JOINTNAME"].ToString()) != "")
                {
                    txtjname2.Text = Convert.ToString(dt12.Rows[0]["JOINTNAME"].ToString());
                    ddlrelationj2.SelectedValue = Convert.ToString(dt12.Rows[0]["JOINTRELATION"].ToString());
                    if (dt12.Rows[0]["JOINTDOB"].ToString() != "" && Convert.ToDateTime(dt12.Rows[0]["JOINTDOB"]).ToString("dd/MM/yyyy") != "01/01/1900") // condition added by abhishek 14-02-2018 Because of exception
                    {
                        txtjbirth2.Text = Convert.ToDateTime(dt12.Rows[0]["JOINTDOB"]).ToString("dd/MM/yyyy");                                            //Dhanya shetty//21-03-2017
                    }
                }
            }

            if (Convert.ToString(dt.Rows[0]["Minor_acc"].ToString()) == "1")
            {
                chkYes.Checked  = true;
                dvminor.Visible = true;
                dvmname.Visible = true;
                dvmdate.Visible = true;
            }
            else
            {
                chkNo.Checked = true;
            }
            txtcustid.Text  = Convert.ToString(dt.Rows[0]["M_Custno"].ToString());
            txtacconam.Text = Convert.ToString(dt.Rows[0]["M_OPRNAME"].ToString());
            txtmdate.Text   = Convert.ToString(dt.Rows[0]["M_DOB"].ToString());

            if (Convert.ToString(dt.Rows[0]["M_RELATION"].ToString()) == "1")
            {
                rdbmom.Checked = true;
            }
            else if (Convert.ToString(dt.Rows[0]["M_RELATION"].ToString()) == "2")
            {
                rdbdad.Checked = true;
            }
            else if (Convert.ToString(dt.Rows[0]["M_RELATION"].ToString()) == "3")
            {
                rdbguard.Checked = true;
            }

            Submit.Focus();
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
예제 #8
0
 private void EmailId_Completed(object sender, EventArgs e)
 {
     Submit.Focus();
 }