Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string id = Request.QueryString["Id"];
                usetAuthentication.UserId = id;

                if (id == null)
                {
                    Response.Redirect("Null");
                }
                else
                {
                    if (userAuthenticationManager.CheckState(usetAuthentication))
                    {
                        homeHyperLink.NavigateUrl += "?Id=" + id;

                        // load the category and company at the page starting
                        GetAllCategoryAndBindWithCategoryDropDown();
                        GetAllCompanyAndBindWithCompanyDropDown();
                    }
                    else
                    {
                        Response.Redirect("LogInUI.aspx?Message=Please log in first");
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string id = Request.QueryString["Id"];
                usetAuthentication.UserId = id;

                if (id == null)
                {
                    Response.Redirect("Null");
                }
                else
                {
                    if (userAuthenticationManager.CheckState(usetAuthentication))
                    {
                        homeHyperLink.NavigateUrl += "?Id=" + id;

                        ////retrive data when form starts and bind it with dataGridView
                        BindDataWithGridView();
                    }
                    else
                    {
                        Response.Redirect("LogInUI.aspx?Message=Please log in first");
                    }
                }
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // load company name on form load
            if (!IsPostBack)
            {
                string id = Request.QueryString["Id"];
                usetAuthentication.UserId = id;

                if (id == null)
                {
                    Response.Redirect("Null");
                }
                else
                {
                    if (userAuthenticationManager.CheckState(usetAuthentication))
                    {
                        homeHyperLink.NavigateUrl += "?Id=" + id;

                        GetAndBindCompany();
                    }
                    else
                    {
                        Response.Redirect("LogInUI.aspx?Message=Please log in first");
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string id = Request.QueryString["UserId"];
                usetAuthentication.UserId = id;

                if (id == null)
                {
                    Response.Redirect("Null");
                }
                else
                {
                    if (userAuthenticationManager.CheckState(usetAuthentication))
                    {
                        homeHyperLink.NavigateUrl += "?Id=" + id;

                        // receive id from CategorySetup page
                        int categoryId = Convert.ToInt32(Request.QueryString["Id"]);

                        // load CategoryName by Id
                        category = categoryManager.GetCategoryById(categoryId);

                        // set CategoryName on textBox
                        SetNameOnTextBox();
                    }
                    else
                    {
                        Response.Redirect("LogInUI.aspx?Message=Please log in first");
                    }
                }
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string id = Request.QueryString["Id"];
                usetAuthentication.UserId = id;

                if (id == null)
                {
                    Response.Redirect("Null");
                }
                else
                {
                    if (userAuthenticationManager.CheckState(usetAuthentication))
                    {
                        GetAndBindWithDataGrid();
                        LoadAllQuantitiesAndShow();
                        todayDateLabel.Text = DateTime.Today.ToString("D");
                        userIdLabel.Text    = "User Id: " + id;

                        categorySetupHyperLink.NavigateUrl     += "?Id=" + id;
                        companySetupHyperLink.NavigateUrl      += "?Id=" + id;
                        stockInHyperLink.NavigateUrl           += "?Id=" + id;
                        stockOutHyperLink.NavigateUrl          += "?Id=" + id;
                        itemSetupHyperLink.NavigateUrl         += "?Id=" + id;
                        searchHyperLink.NavigateUrl            += "?Id=" + id;
                        salesBetweenDatesHyperLink.NavigateUrl += "?Id=" + id;
                    }
                    else
                    {
                        Response.Redirect("LogInUI.aspx?Message=Please log in first");
                    }
                }
            }
        }
Beispiel #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // load company name on page load
            if (!IsPostBack)
            {
                string id = Request.QueryString["Id"];
                usetAuthentication.UserId = id;

                if (id == null)
                {
                    Response.Redirect("Null");
                }
                else
                {
                    if (userAuthenticationManager.CheckState(usetAuthentication))
                    {
                        homeHyperLink.NavigateUrl += "?Id=" + id;

                        GetCompanyAndBindWithDropDown();
                        // default selection
                        itemDropDownList.Items.Insert(0, "--Select Item--");
                    }
                    else
                    {
                        Response.Redirect("LogInUI.aspx?Message=Please log in first");
                    }
                }
            }
        }