Esempio n. 1
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");
                }
                //using (WebClient webClient = new WebClient())
                //{
                //    string listdepartment = webClient.DownloadString("http://" + host + "/AD_Service/WCF/Service1.svc/listDepartment");



                List <String> listDepartment = ClerkBusinessLogic.GetDepartment();
                if (!listDepartment.Count().Equals(0))
                {
                    listDepartment.Insert(0, "Select Any Department");
                    DropDownList1.DataSource = listDepartment;
                    DropDownList1.DataBind();
                }
            }
        }
Esempio n. 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;
                }
            }
        }