示例#1
0
        private bool DoEdit(int _id)
        {
            try
            {
                BLL.product   bll   = new BLL.product();
                Model.product model = bll.GetModel(_id);

                model.title     = txtTitle.Text;
                model.category  = Convert.ToInt32(ddlCategoryId.SelectedValue);
                model.sort      = Convert.ToInt32(txtSort.Text);
                model.city      = txtCity.Text;
                model.lat       = txtLat.Text;
                model.lon       = txtLon.Text;
                model.addr      = txtAddr.Text;
                model.cont      = txtCont.Text;
                model.add_time  = Convert.ToDateTime(txtAddTime.Text);
                model.pass_time = Convert.ToDateTime(txtPassTime.Text);


                if (bll.Update(model))
                {
                    AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), "修改产品信息:" + model.title); //记录日志
                    return(true);
                }
            }
            catch
            {
                return(false);
            }
            return(false);
        }
示例#2
0
        private bool DoEdit(int _id)
        {
            bool result = true;

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

            model.name = txtName.Text.Trim();

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

            return(result);
        }
示例#3
0
 private void ShowInfo(int _id)
 {
     BLL.product   bll   = new BLL.product();
     Model.product model = bll.GetModel(_id);
     txtName.Text = model.name;
 }