예제 #1
0
        public void BindGrid(string depart, string date)
        {
            List <ClerkViewRequest> store_Requests = ClerkBusinessLogic.GetAllPendingRequest(depart, date);


            if (!store_Requests.Count().Equals(0))
            {
                Img_NoRecord.Visible = false;
                GridView1.Visible    = true;
                GridView1.DataSource = store_Requests;
                GridView1.DataBind();
            }
            else
            {
                GridView1.Visible    = false;
                Img_NoRecord.Visible = true;
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            /*Code by Mani & Prasanth*/
            string host = Application["host"].ToString();

            if (!IsPostBack)
            {
                Employee emp = (Employee)Session["user"];
                if (emp.Employee_Role != "Store-Clerk")
                {
                    Response.Redirect("LoginPage.aspx");
                }

                string        date           = DateTime.Now.ToString("yyy-MM-dd");
                List <string> departmentList = ClerkBusinessLogic.GetDepartment();
                if (departmentList != null)
                {
                    departmentList.Insert(0, "ALL");
                    DropDownList1.DataSource = departmentList;
                    DropDownList1.DataBind();
                }

                string namae = DropDownList1.SelectedValue;

                List <ClerkViewRequest> store_Requests = ClerkBusinessLogic.GetAllPendingRequest("ALL", "");

                if (!store_Requests.Count().Equals(0))
                {
                    Img_NoRecord.Visible = false;
                    GridView1.DataSource = store_Requests;
                    GridView1.DataBind();
                }
                else
                {
                    Img_NoRecord.Visible = true;
                }
            }
        }