public vendor_products Insert_vendor_products_select(int ID)
 {
     vendor_products                  = vendor_products.Select(ID);
     Insert_vendor_id_txt.Text        = Convert.ToString(vendor_products.vendor_id);
     Insert_product_id_txt.Text       = Convert.ToString(vendor_products.product_id);
     Insert_product_qty_txt.Text      = Convert.ToString(vendor_products.product_qty);
     Insert_Product_exp_date_txt.Text = Convert.ToString(vendor_products.Product_exp_date);
     Insert_lot_id_txt.Text           = Convert.ToString(vendor_products.lot_id);
     Insert_Department_txt.Text       = Convert.ToString(vendor_products.Department);
     return(vendor_products);
 }
 public vendor_products Insert_vendor_products_select(int ID)
 {
     vendor_products = vendor_products.Select(ID);
     Insert_vendor_id_txt.Text = Convert.ToString(vendor_products.vendor_id);
     Insert_product_id_txt.Text = Convert.ToString(vendor_products.product_id);
     Insert_product_qty_txt.Text = Convert.ToString(vendor_products.product_qty);
     Insert_Product_exp_date_txt.Text = Convert.ToString(vendor_products.Product_exp_date);
     Insert_lot_id_txt.Text = Convert.ToString(vendor_products.lot_id);
     Insert_Department_txt.Text = Convert.ToString(vendor_products.Department);
     return vendor_products;
 }
 public vendor_products vendor_products_insert()
 {
     vendor_products.vendor_id        = Convert.ToInt32(Insert_vendor_id_txt.Text);
     vendor_products.product_id       = Convert.ToInt32(Insert_product_id_txt.Text);
     vendor_products.product_qty      = Convert.ToInt32(Insert_product_qty_txt.Text);
     vendor_products.Product_exp_date = Insert_Product_exp_date_txt.Text;
     vendor_products.lot_id           = Convert.ToInt32(Insert_lot_id_txt.Text);
     vendor_products.Department       = Insert_Department_txt.Text;
     vendor_products = vendor_products.Insert(vendor_products);
     Insert_vendor_products_GridView.DataBind();
     Update_vendor_products_GridView.DataBind();
     Delete_vendor_products_GridView.DataBind();
     return(vendor_products);
 }
 public vendor_products vendor_products_update(int ID)
 {
     vendor_products = vendor_products.Select(ID);
     vendor_products.vendor_prod_id   = Convert.ToInt32(Update_vendor_prod_id_txt.Text);
     vendor_products.vendor_id        = Convert.ToInt32(Update_vendor_id_txt.Text);
     vendor_products.product_id       = Convert.ToInt32(Update_product_id_txt.Text);
     vendor_products.product_qty      = Convert.ToInt32(Update_product_qty_txt.Text);
     vendor_products.Product_exp_date = Update_Product_exp_date_txt.Text;
     vendor_products.lot_id           = Convert.ToInt32(Update_lot_id_txt.Text);
     vendor_products.Department       = Update_Department_txt.Text;
     vendor_products.Update(vendor_products);
     Insert_vendor_products_GridView.DataBind();
     Update_vendor_products_GridView.DataBind();
     Delete_vendor_products_GridView.DataBind();
     return(vendor_products);
 }
 protected void INSERT(object sender, EventArgs e)
 {
     vendor_products = vendor_products_insert();
 }
 protected void Insert_Select_Record(object sender, EventArgs e)
 {
     vendor_products = Insert_vendor_products_select(Convert.ToInt32(Insert_vendor_products_GridView.SelectedValue));
 }
 protected void UPDATE(object sender, EventArgs e)
 {
     vendor_products = vendor_products_update(Convert.ToInt32(Update_vendor_products_GridView.SelectedValue));
 }
 public vendor_products vendor_products_insert()
 {
     vendor_products.vendor_id = Convert.ToInt32(Insert_vendor_id_txt.Text);
     vendor_products.product_id = Convert.ToInt32(Insert_product_id_txt.Text);
     vendor_products.product_qty = Convert.ToInt32(Insert_product_qty_txt.Text);
     vendor_products.Product_exp_date = Insert_Product_exp_date_txt.Text;
     vendor_products.lot_id = Convert.ToInt32(Insert_lot_id_txt.Text);
     vendor_products.Department = Insert_Department_txt.Text;
     vendor_products = vendor_products.Insert(vendor_products);
     Insert_vendor_products_GridView.DataBind();
     Update_vendor_products_GridView.DataBind();
     Delete_vendor_products_GridView.DataBind();
     return vendor_products;
 }
 protected void Update_Select_Record(object sender, EventArgs e)
 {
     vendor_products = Update_vendor_products_select(Convert.ToInt32(Update_vendor_products_GridView.SelectedValue));
 }
 protected void UPDATE(object sender, EventArgs e)
 {
     vendor_products = vendor_products_update(Convert.ToInt32(Update_vendor_products_GridView.SelectedValue));
 }
 protected void INSERT(object sender, EventArgs e)
 {
     vendor_products = vendor_products_insert();
 }
 public vendor_products vendor_products_update(int ID)
 {
     vendor_products = vendor_products.Select(ID);
     vendor_products.vendor_prod_id = Convert.ToInt32(Update_vendor_prod_id_txt.Text);
     vendor_products.vendor_id = Convert.ToInt32(Update_vendor_id_txt.Text);
     vendor_products.product_id = Convert.ToInt32(Update_product_id_txt.Text);
     vendor_products.product_qty = Convert.ToInt32(Update_product_qty_txt.Text);
     vendor_products.Product_exp_date = Update_Product_exp_date_txt.Text;
     vendor_products.lot_id = Convert.ToInt32(Update_lot_id_txt.Text);
     vendor_products.Department = Update_Department_txt.Text;
     vendor_products.Update(vendor_products);
     Insert_vendor_products_GridView.DataBind();
     Update_vendor_products_GridView.DataBind();
     Delete_vendor_products_GridView.DataBind();
     return vendor_products;
 }