Example #1
0
 public void equipment_delete(int ID)
 {
     equipment.Delete(ID);
     Insert_equipment_GridView.DataBind();
     Update_equipment_GridView.DataBind();
     Delete_equipment_GridView.DataBind();
 }
Example #2
0
 public equipment equipment_insert()
 {
     equipment.resource_ID  = Convert.ToInt32(Insert_resource_ID_txt.Text);
     equipment.vendor_id    = Convert.ToInt32(Insert_vendor_id_txt.Text);
     equipment.Description  = Insert_Description_txt.Text;
     equipment.costType     = Insert_costType_txt.Text;
     equipment.costRate     = Convert.ToDecimal(Insert_costRate_txt.Text);
     equipment.capacity     = Convert.ToInt32(Insert_capacity_txt.Text);
     equipment.make         = Insert_make_txt.Text;
     equipment.model        = Insert_model_txt.Text;
     equipment.operatorName = Insert_operatorName_txt.Text;
     equipment.startDate    = Convert.ToDateTime(Insert_startDate_txt.Text);
     equipment.endDate      = Convert.ToDateTime(Insert_endDate_txt.Text);
     equipment = equipment.Insert(equipment);
     Insert_equipment_GridView.DataBind();
     Update_equipment_GridView.DataBind();
     Delete_equipment_GridView.DataBind();
     return(equipment);
 }
Example #3
0
 public equipment equipment_update(int ID)
 {
     equipment = equipment.Select(ID);
     equipment.equipment_id = Convert.ToInt32(Update_equipment_id_txt.Text);
     equipment.resource_ID  = Convert.ToInt32(Update_resource_ID_txt.Text);
     equipment.vendor_id    = Convert.ToInt32(Update_vendor_id_txt.Text);
     equipment.Description  = Update_Description_txt.Text;
     equipment.costType     = Update_costType_txt.Text;
     equipment.costRate     = Convert.ToDecimal(Update_costRate_txt.Text);
     equipment.capacity     = Convert.ToInt32(Update_capacity_txt.Text);
     equipment.make         = Update_make_txt.Text;
     equipment.model        = Update_model_txt.Text;
     equipment.operatorName = Update_operatorName_txt.Text;
     equipment.startDate    = Convert.ToDateTime(Update_startDate_txt.Text);
     equipment.endDate      = Convert.ToDateTime(Update_endDate_txt.Text);
     equipment.Update(equipment);
     Insert_equipment_GridView.DataBind();
     Update_equipment_GridView.DataBind();
     Delete_equipment_GridView.DataBind();
     return(equipment);
 }