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();
                }
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            string   host = Application["host"].ToString();
            Employee user = (Employee)Session["user"];
            List <ClerkViewRequest> updatelist = new List <ClerkViewRequest>();

            foreach (GridViewRow gvr in GridView1.Rows)
            {
                string Item_Number = gvr.Cells[1].Text;
                string Category    = gvr.Cells[2].Text;
                string Description = gvr.Cells[3].Text;
                string Bin_number  = gvr.Cells[4].Text;
                int    Req_Qunty   = Convert.ToInt32(gvr.Cells[5].Text);
                int    Available   = Convert.ToInt32(gvr.Cells[6].Text);

                TextBox txtbox1          = (TextBox)gvr.Cells[7].FindControl(id: "CollectedQuntity") as TextBox;
                int     CollectedQuntity = Convert.ToInt32(value: txtbox1.Text);

                TextBox textBox2        = (TextBox)gvr.FindControl("DamagedQuantity");
                int     DamagedQuantity = Convert.ToInt32(textBox2.Text);

                if (CollectedQuntity != 0)
                {
                    updatelist.Add(new ClerkViewRequest(Item_Number, Category, Description, Req_Qunty, Bin_number, Available, CollectedQuntity, DamagedQuantity));
                }
            }

            ClerkBusinessLogic.Warelist(updatelist, user);


            ClerkBusinessLogic.Disbursementupdate();
            Response.Redirect("Disbursemtlist.aspx");
        }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            /*Code by Mani & Prasanth*/
            int id = Convert.ToInt32(Request.QueryString["ID"]);

            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 rawJSON = webClient.DownloadString("http://" + host + "/AD_Service/WCF/Service1.svc/listClerkRequest/"+id);
                    //List<Store_Request_items> store_Requests_items = JsonConvert.DeserializeObject<List<Store_Request_items>>(rawJSON);

                    var storeRequestsitems = ClerkBusinessLogic.storeRequestItems(id);

                    if (!storeRequestsitems.Count().Equals(0))
                    {
                        GridView1.DataSource = storeRequestsitems;
                        GridView1.DataBind();
                    }
                    else
                    {
                        GridView1.Visible = false;
                    }
                }
            }
        }
Exemple #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            /*Code by Mani & Prasanth*/
            if (!IsPostBack)
            {
                Employee emp = (Employee)Session["user"];
                if (emp.Employee_Role != "Store-Clerk")
                {
                    Response.Redirect("LoginPage.aspx");
                }
                Logic_University_Entity model = new Logic_University_Entity();

                List <ClerkViewRequest> result = ClerkBusinessLogic.collectedlist();

                if (!result.Count().Equals(0))
                {
                    GridView1.DataSource = result;
                    GridView1.DataBind();
                }
                else
                {
                    Img_NoRecordFound.Visible = true;
                }
            }
            else
            {
                lbl_no.Visible = true;
            }
        }
 protected void Button1_Click(object sender, EventArgs e)
 {
     try
     {
         string sus = ClerkBusinessLogic.Disbursementupdate();
     }
     catch (Exception)
     {
     }
 }
Exemple #6
0
        protected void OnPageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            GridView1.PageIndex = e.NewPageIndex;
            List <ClerkViewRequest> result = ClerkBusinessLogic.collectedlist();

            if (!result.Count().Equals(0))
            {
                GridView1.DataSource = result;
                GridView1.DataBind();
            }
            else
            {
                Response.Write("no record ");
            }
        }
Exemple #7
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;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Employee user = (Employee)Session["user"];

                List <ClerkViewRequest> list = ClerkBusinessLogic.collectedlist();
                if (list.Count != 0)
                {
                    GridView1.DataSource = list;
                    GridView1.DataBind();
                }
                else
                {
                    Img_NoRecord.Visible = true;
                    btn_Update.Visible   = false;
                    btn_cancel.Visible   = false;
                }
            }
        }
Exemple #9
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;
                }
            }
        }