private void ShowInfo(int _id) { BLL.car_typebll bll = new BLL.car_typebll(); Model.car_typeinfo model = bll.GetModel(_id); txtType_Code.Text = model.Type_Code; txtType_Name.Text = model.Type_Name; }
private bool DoEdit(int _id) { bool result = true; BLL.car_typebll bll = new BLL.car_typebll(); Model.car_typeinfo model = bll.GetModel(_id); model.Type_Code = txtType_Code.Text.Trim(); model.Type_Name = txtType_Name.Text; if (!bll.Update(model)) { result = false; } return(result); }