private void ShowInfo(int _id) { BLL.car_repair_plantbll bll = new BLL.car_repair_plantbll(); Model.car_repair_plantinfo model = bll.GetModel(_id); txtCode.Text = model.Code; txtCode.ReadOnly = true; txtRepair_Plant_Name.Text = model.Repair_Plant_Name; txtAddress.Text = model.Address; txtContactor.Text = model.Contactor; txtTel.Text = model.Tel; }
private bool DoEdit(int _id) { bool result = true; BLL.car_repair_plantbll bll = new BLL.car_repair_plantbll(); Model.car_repair_plantinfo model = bll.GetModel(_id); model.Code = txtCode.Text.Trim(); model.Repair_Plant_Name = txtRepair_Plant_Name.Text; model.Address = txtAddress.Text; model.Contactor = txtContactor.Text; model.Tel = txtTel.Text; if (!bll.Update(model)) { result = false; } return(result); }