コード例 #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (Session["UserName"] == null)
            {
                Response.Redirect("FrmLogin.aspx");
            }

            if (!IsPostBack)
            {
                ddlbind.BindAccType(ddlAccType);
                ddlbind.BindAccType(ddlAccType1);
                ddlbind.BindAccStatus11(ddlOpType);
                ddlbind.BindAccStatus11(ddlOpType1);
                autoglname.ContextKey = Session["BRCD"].ToString();

                //Only admin will have the access to view the form
                if ((Session["BRCD"].ToString() != "1") && (CMN.GetParameter("1", "CBSP", "1003").ToString() == "N"))
                {
                    HttpContext.Current.Response.Redirect("FrmBlank.aspx", false);
                }
                else
                {
                    TxtBrcd.Text = Session["BRCD"].ToString();
                    Txtprodcode.Focus();
                }
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
コード例 #2
0
    protected void Txtprodcode_TextChanged(object sender, EventArgs e)
    {
        try
        {
            string   GL     = BD.GetAccTypeGL(Txtprodcode.Text, Session["BRCD"].ToString());
            string[] GLCODE = GL.Split('_');

            ViewState["DRGL"]      = GL[1].ToString();
            AutoAccname.ContextKey = Session["BRCD"].ToString() + "_" + Txtprodcode.Text + "_" + ViewState["DRGL"].ToString();
            string PDName = customcs.GetProductName(Txtprodcode.Text, Session["BRCD"].ToString());
            if (PDName != null)
            {
                txtname.Text = PDName;
                txtaccno.Focus();
            }
            else
            {
                WebMsgBox.Show("Product Number is Invalid....!", this.Page);
                Txtprodcode.Text = "";
                Txtprodcode.Focus();
            }
        }
        catch (Exception Ex)
        {
            ExceptionLogging.SendErrorToText(Ex);
        }
    }
コード例 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                if (Session["UserName"] == null)
                {
                    Response.Redirect("FrmLogin.aspx");
                }

                BindGrid();
                autoglname.ContextKey = Session["BRCD"].ToString();
                TxtBrcd.Text          = Session["BRCD"].ToString();
                Txtprodcode.Focus();
            }
            catch (Exception Ex)
            {
                ExceptionLogging.SendErrorToText(Ex);
            }
        }
    }