Exemplo n.º 1
0
        //HttpCookie aCOOKIE;
        //HttpCookie bCOOKIE;

        protected void Page_Load(object sender, EventArgs e)
        {
            System.Web.UI.HtmlControls.HtmlGenericControl li = (System.Web.UI.HtmlControls.HtmlGenericControl) this.Page.Master.FindControl("ViewInvoice");
            li.Attributes.Add("class", "active");

            if (Session["Role"] != null)
            {
                if (Session["Role"].ToString() == "Employee")
                {
                    Response.Redirect("../DepartmentEmployee/RequestStationery.aspx");
                }
                else if (Session["Role"].ToString() == "DelegateHead")
                {
                    Response.Redirect("../DepartmentEmployee/RequestStationery.aspx");
                }
                else if (Session["Role"].ToString() == "Head")
                {
                    Response.Redirect("../DepartmentHead/PendingRequests.aspx");
                }
                else if (Session["Role"].ToString() == "StoreSupervisor")
                {
                    Response.Redirect("../StoreSupervisor/PendingAdjustment.aspx");
                }
                else if (Session["Role"].ToString() == "StoreManager")
                {
                    Response.Redirect("../StoreSupervisor/PendingAdjustment.aspx");
                }
            }
            else
            {
                Response.Redirect("../Login.aspx");
            }

            Label lblWelcome = (Label)this.Master.FindControl("lblWelcome");

            lblWelcome.Text = Session["Name"].ToString();//from login username

            if (!IsPostBack)
            {
                ddlSupplier.DataSource = ViewInvoiceController.getSuppliers();
                ddlSupplier.DataBind();
            }
        }
Exemplo n.º 2
0
 protected void btnView_Click(object sender, EventArgs e)
 {
     l = ViewInvoiceController.appearInvoice(ddlSupplier.SelectedItem.Text);
     grdDisbursementList.DataSource = l;
     grdDisbursementList.DataBind();
 }