Ejemplo n.º 1
0
 protected void OnRowCancelingEdit(object sender, EventArgs e)
 {
     Purchasegoods.EditIndex = -1;
     //BindGrid();
     Purchasegoods.DataSource = ClerkMaintenanceBusinessLogic.PurchaseGoods();
     Purchasegoods.DataBind();
 }
Ejemplo n.º 2
0
        protected void OnRowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            GridViewRow row  = Purchasegoods.Rows[e.RowIndex];
            Label       l    = (Label)row.FindControl("label2");
            string      desc = l.Text;

            ClerkMaintenanceBusinessLogic.Deleteitem(desc);
            Purchasegoods.DataSource = ClerkMaintenanceBusinessLogic.PurchaseGoods();
            Purchasegoods.DataBind();
        }
Ejemplo n.º 3
0
        protected void OnRowUpdating(object sender, GridViewUpdateEventArgs e)
        {
            GridViewRow row         = Purchasegoods.Rows[e.RowIndex];
            Label       l           = (Label)row.FindControl("label2");
            string      Description = l.Text;
            int         quantity    = Convert.ToInt32((row.FindControl("TextBox1") as TextBox).Text);

            ClerkMaintenanceBusinessLogic.Edititem(Description, quantity);
            Purchasegoods.EditIndex = -1;
            Purchasegoods.DataBind();
            Response.Redirect("purchaseGoods.aspx");
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            /*Code by Subash*/

            if (!IsPostBack)
            {
                Employee emp = (Employee)Session["user"];
                if (emp.Employee_Role != "Store-Clerk")
                {
                    Response.Redirect("LoginPage.aspx");
                }
                Purchasegoods.DataSource = ClerkMaintenanceBusinessLogic.PurchaseGoods();
                Purchasegoods.DataBind();
            }
        }
Ejemplo n.º 5
0
 protected void onRowEditing(object sender, GridViewEditEventArgs e)
 {
     this.Purchasegoods.EditIndex = e.NewEditIndex;
     Purchasegoods.DataSource     = ClerkMaintenanceBusinessLogic.PurchaseGoods();
     Purchasegoods.DataBind();
 }