Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        private bool DoAdd()
        {
            bool result = true;

            Model.car_typeinfo model = new Model.car_typeinfo();
            BLL.car_typebll    bll   = new BLL.car_typebll();
            model.Type_Code = txtType_Code.Text.Trim();
            model.Type_Name = txtType_Name.Text;

            if (bll.Add(model) < 1)
            {
                result = false;
            }
            return(result);
        }
Ejemplo n.º 3
0
        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);
        }