예제 #1
0
 public void products_delete(int ID)
 {
     products.Delete(ID);
     Insert_products_GridView.DataBind();
     Update_products_GridView.DataBind();
     Delete_products_GridView.DataBind();
 }
예제 #2
0
 public products products_update(int ID)
 {
     products                     = products.Select(ID);
     products.product_id          = Convert.ToInt32(Update_product_id_txt.Text);
     products.Resource_ID         = Convert.ToInt32(Update_Resource_ID_txt.Text);
     products.product_name        = Update_product_name_txt.Text;
     products.product_type        = Update_product_type_txt.Text;
     products.product_qty         = Convert.ToInt32(Update_product_qty_txt.Text);
     products.product_desc        = Update_product_desc_txt.Text;
     products.product_color       = Update_product_color_txt.Text;
     products.product_size        = Update_product_size_txt.Text;
     products.product_cost        = Convert.ToDecimal(Update_product_cost_txt.Text);
     products.Product_exp_date    = Convert.ToDateTime(Update_Product_exp_date_txt.Text);
     products.Product_Alergy_info = Update_Product_Alergy_info_txt.Text;
     products.Product_refrigde    = Update_Product_refrigde_txt.Text;
     products.Product_Flammable   = Update_Product_Flammable_txt.Text;
     products.Product_Hazard      = Update_Product_Hazard_txt.Text;
     products.Product_Other       = Update_Product_Other_txt.Text;
     products.Product_Min_Inv     = Convert.ToInt32(Update_Product_Min_Inv_txt.Text);
     products.Product_Barcode     = Update_Product_Barcode_txt.Text;
     products.Product_subtype     = Update_Product_subtype_txt.Text;
     products.Make                = Update_Make_txt.Text;
     products.Model               = Update_Model_txt.Text;
     products.FEMA_Description    = Update_FEMA_Description_txt.Text;
     products.Year                = Update_Year_txt.Text;
     products.RFID                = Update_RFID_txt.Text;
     products.Serial_Number       = Update_Serial_Number_txt.Text;
     products.Height              = Update_Height_txt.Text;
     products.Length              = Update_Length_txt.Text;
     products.Depth               = Update_Depth_txt.Text;
     products.Weight              = Update_Weight_txt.Text;
     products.OAI                 = Update_OAI_txt.Text;
     products.OAI_Type            = Update_OAI_Type_txt.Text;
     products.Use                 = Update_Use_txt.Text;
     products.Brand               = Update_Brand_txt.Text;
     products.Power_Supply        = Update_Power_Supply_txt.Text;
     products.Gas_Type            = Update_Gas_Type_txt.Text;
     products.Needs_Gas           = Convert.ToBoolean(Update_Needs_Gas_txt.Text);
     products.Needs_Electricity   = Convert.ToBoolean(Update_Needs_Electricity_txt.Text);
     products.Availability        = Update_Availability_txt.Text;
     products.Datetime            = Convert.ToDateTime(Update_Datetime_txt.Text);
     products.OpenStatus          = Update_OpenStatus_txt.Text;
     products.Update(products);
     Insert_products_GridView.DataBind();
     Update_products_GridView.DataBind();
     Delete_products_GridView.DataBind();
     return(products);
 }