private void ShowInfo(int _id) { BLL.car_repair_itembll bll = new BLL.car_repair_itembll(); Model.car_repair_iteminfo model = bll.GetModel(_id); txtCode.Text = model.Code; txtRepair_Item_Name.Text = model.Repair_Item_Name; }
private bool DoAdd() { bool result = true; Model.car_repair_iteminfo model = new Model.car_repair_iteminfo(); BLL.car_repair_itembll bll = new BLL.car_repair_itembll(); model.Code = txtCode.Text.Trim(); model.Repair_Item_Name = txtRepair_Item_Name.Text; if (bll.Add(model) < 1) { result = false; } return(result); }
private bool DoEdit(int _id) { bool result = true; BLL.car_repair_itembll bll = new BLL.car_repair_itembll(); Model.car_repair_iteminfo model = bll.GetModel(_id); model.Code = txtCode.Text.Trim(); model.Repair_Item_Name = txtRepair_Item_Name.Text; if (!bll.Update(model)) { result = false; } return(result); }