Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserID"] != null)
            {
                if (!IsPostBack)
                {
                    GetProductDetails();
                }
                // ddlCategory.Items.Insert(0, new ListItem("--Select--", "0"));
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
            DataTable chk_Permission = us_dll.CheckUserAccessLevel(Convert.ToInt32(Session["UserID"]), 1);


            if (chk_Permission.Rows.Count > 0)
            {
                if (chk_Permission.Rows[0]["ACCESSLEVEL"].ToString() == "FA")
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "permission", "permission('FA');", true);
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "permission", "permission('RO');", true);
                }
            }
            // AddProductDetails();
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserID"] != null)
            {
                if (!IsPostBack)
                {
                    GetProducts();
                    GetProductLabelDetails();
                    //ShowEmptyGrid();
                }
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
            DataTable chk_Permission = us_dll.CheckUserAccessLevel(Convert.ToInt32(Session["UserID"]), 2);

            if (chk_Permission.Rows.Count > 0)
            {
                if (chk_Permission.Rows[0]["ACCESSLEVEL"].ToString() == "FA")
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "permission", "permission('FA');", true);
                }
                else
                {
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "permission", "permission('RO');", true);
                }
            }


            //txtManufacturingDate.Attributes.Add("onchange", "addYear(this,'365Days',365)");
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["UserID"] != null)
            {
                if (!IsPostBack)
                {
                    CheckUserGroup();
                    GetCaseBoxLabelDetails();
                    GetCaseDetails();
                    GetVoidDetails();
                    GetRejectdDetails();
                }

                DataTable chk_Permission = us_dll.CheckUserAccessLevel(Convert.ToInt32(Session["UserID"]), 2);
                if (chk_Permission.Rows.Count > 0)
                {
                    if (chk_Permission.Rows[0]["ACCESSLEVEL"].ToString() == "FA")
                    {
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "permission", "permission('FA');", true);
                    }
                    else
                    {
                        Page.ClientScript.RegisterStartupScript(this.GetType(), "permission", "permission('RO');", true);
                    }
                }
                if (CheckUserGroup() == 4)
                {
                    // btnAddNewLable.Visible = true;
                    btnVoid.Visible          = true;
                    btnPrint.Visible         = true;
                    btnRead.Visible          = true;
                    btnAddCaseLabels.Visible = true;
                    btnTakeout.Visible       = true;
                    btnReturn.Visible        = true;


                    //Page.ClientScript.RegisterStartupScript(this.GetType(), "DisableButtons", "disableButtons('QA');", true);
                }
                else
                {
                    //btnAddNewLable.Visible = false;
                    btnVoid.Visible          = false;
                    btnPrint.Visible         = true;
                    btnRead.Visible          = true;
                    btnAddCaseLabels.Visible = true;
                    btnTakeout.Visible       = true;
                    //btnReturn.Visible = false;

                    // Page.ClientScript.RegisterStartupScript(this.GetType(), "DisableButtons", "disableButtons('US');", true);
                }
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
        }