Exemplo n.º 1
0
 private void ShowInfo(int _id)
 {
     DAL.AreaDal bll   = new DAL.AreaDal();
     Model.Area  model = bll.GetModel(_id);
     txtTitle.Text           = model.title;
     txtSortId.Text          = model.sort;
     ddlParent.SelectedValue = model.parent.ToString();
     txtCode.Text            = model.code;
 }
Exemplo n.º 2
0
        private bool DoEdit(int _id)
        {
            bool result = true;

            DAL.AreaDal bll   = new DAL.AreaDal();
            Model.Area  model = bll.GetModel(_id);

            model.title  = txtTitle.Text.Trim();
            model.sort   = txtSortId.Text.Trim();
            model.parent = int.Parse(ddlParent.SelectedValue.Trim());
            model.code   = txtCode.Text.Trim();
            if (!bll.Update(model))
            {
                result = false;
            }

            return(result);
        }