Example #1
0
 private void BindInfo()
 {
     BLL.user_collection   bll   = new BLL.user_collection();
     Model.user_collection model = bll.GetModel(this.id);
     if (model == null)
     {
         JscriptMsg("信息不存在或已被删除!", "back");
         return;
     }
     txtgroup_id.Text = model.group_id + "";
     txtdata_id.Text  = model.data_id + "";
     txtuser_id.Text  = model.user_id + "";
     txtadd_time.Text = model.add_time + "";
 }
Example #2
0
        //保存
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            ChkAdminLevel("_ybd_user_collection", EnumCollection.ActionEnum.Modify.ToString()); //检查权限
            BLL.user_collection   bll   = new BLL.user_collection();
            Model.user_collection model = bll.GetModel(this.id);

            model.group_id = Convert.ToInt32(txtgroup_id.Text);
            model.data_id  = Convert.ToInt32(txtdata_id.Text);
            model.user_id  = Convert.ToInt32(txtuser_id.Text);
            model.add_time = Convert.ToDateTime(txtadd_time.Text);

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