protected void search_Click(object sender, EventArgs e) { supplier s = new supplier(); s = (supplier)Session["supplier"]; GridView1.DataSource= clerk.searchbydescription(TextBox1.Text, s.supplierId); GridView1.DataBind(); }
protected void Confirm_Click(object sender, EventArgs e) { supplier s = new supplier(); s = (supplier)Session["supplier"]; int k = Convert.ToInt32(GridView1.SelectedRow.Cells[1].Text); int i = Convert.ToInt32(NewPrice.Text); clerk.editprice(k, s.supplierId, i); GridView1.DataSource = clerk.showitems(s.supplierId); GridView1.DataBind(); }
public void addsupplier(string name, string contactname, string phonenNO, string faxno, string address, string gst) { supplier ac = new supplier(); ac.compName = name; ac.contactName = contactname; ac.phoneNo = phonenNO; ac.faxNo = faxno; ac.address = address; ac.GST_RegistrationNo = gst; ctx.suppliers.Add(ac); ctx.SaveChanges(); }
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { supplier s = new supplier(); s = (supplier)Session["supplier"]; int k = Convert.ToInt32(GridView1.SelectedRow.Cells[1].Text); SupplieritemMix sup = new SupplieritemMix(); sup = clerk.showsingleitem(k, s.supplierId); ItemDescription.Text = sup.Itemdescription; ItemCode.Text = sup.itemid.ToString(); ExisitingPricer.Text = sup.price.ToString(); Unit.Text = sup.Unit.ToString(); ClientScript.RegisterStartupScript(this.GetType(), "SayHello2", "$('#exampleModal').modal({})", true); }
protected void Page_Load(object sender, EventArgs e) { User u = (User)Session["UserEntity"]; if (u.RoleId != 4) { Response.Redirect("../Security.aspx"); } supplier s = new supplier(); s = (supplier)Session["supplier"]; Label2.Text = s.supplierId.ToString(); Label4.Text = s.compName; GridView1.DataSource= clerk.showitems(s.supplierId); GridView1.DataBind(); }