Пример #1
0
        private void ShowInfo(int _id)
        {
            BLL.car_maintenance_itembll    bll   = new BLL.car_maintenance_itembll();
            Model.car_maintenance_iteminfo model = bll.GetModel(_id);

            txtCode.Text = model.Code;
            txtMaintenance_Item_Name.Text = model.Maintenance_Item_Name;
        }
Пример #2
0
        private bool DoAdd()
        {
            bool result = true;

            Model.car_maintenance_iteminfo model = new Model.car_maintenance_iteminfo();
            BLL.car_maintenance_itembll    bll   = new BLL.car_maintenance_itembll();
            model.Code = txtCode.Text.Trim();
            model.Maintenance_Item_Name = txtMaintenance_Item_Name.Text;

            if (bll.Add(model) < 1)
            {
                result = false;
            }
            return(result);
        }
Пример #3
0
        private bool DoEdit(int _id)
        {
            bool result = true;

            BLL.car_maintenance_itembll    bll   = new BLL.car_maintenance_itembll();
            Model.car_maintenance_iteminfo model = bll.GetModel(_id);

            model.Code = txtCode.Text.Trim();
            model.Maintenance_Item_Name = txtMaintenance_Item_Name.Text;

            if (!bll.Update(model))
            {
                result = false;
            }
            return(result);
        }