Example #1
0
 private void ShowInfo()
 {
     BLL.common_school   bll   = new BLL.common_school();
     Model.common_school model = bll.GetModel(this.id);
     if (model == null)
     {
         JscriptMsg("信息不存在或已被删除!", "back");
         return;
     }
     txtname.Text = model.name + "";
     txtsort.Text = model.sort + "";
 }
Example #2
0
        private bool DoEdit()
        {
            bool result = false;

            BLL.common_school   bll   = new BLL.common_school();
            Model.common_school model = bll.GetModel(this.id);

            model.name = Convert.ToString(txtname.Text);
            model.sort = Convert.ToInt32(txtsort.Text);

            if (bll.Update(model))
            {
                AddAdminLog(EnumCollection.ActionEnum.Modify.ToString(), "修改学校信息,主键:" + this.id); //记录日志
                result = true;
            }
            return(result);
        }
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("_ybd_common_school", EnumCollection.ActionEnum.Modify.ToString()); //检查权限
            BLL.common_school   bll   = new BLL.common_school();
            Model.common_school model = bll.GetModel(this.id);

            model.name     = Convert.ToString(txtname.Text);
            model.sort     = Convert.ToInt32(txtsort.Text);
            model.add_time = Convert.ToDateTime(txtadd_time.Text);

            if (bll.Update(model))
            {
                AddAdminLog(EnumCollection.ActionEnum.Modify.ToString(), "修改学校信息信息,主键:" + id); //记录日志
                JscriptMsg("修改学校信息信息成功!", "Manage.aspx");
            }
            else
            {
                JscriptMsg("保存过程中发生错误!", "");
            }
        }