//保存 protected void btnSubmit_Click(object sender, EventArgs e) { BLL.common_albums bll = new BLL.common_albums(); Model.common_albums model = bll.GetModel(" group_id = " + (int)EnumCollection.img_group.系统默认二维码logo); if (model != null) { ChkAdminLevel("_default_logo", EnumCollection.ActionEnum.Modify.ToString()); //检查权限 if (!DoEdit(model.id)) { JscriptMsg("保存过程中发生错误!", ""); return; } JscriptMsg("修改系统默认二维码logo成功!", ""); } else { ChkAdminLevel("_default_logo", EnumCollection.ActionEnum.Add.ToString()); //检查权限 if (!DoAdd()) { JscriptMsg("保存过程中发生错误!", ""); return; } JscriptMsg("添加系统默认二维码logo成功!", ""); } }
//保存 protected void btnSubmit_Click(object sender, EventArgs e) { ChkAdminLevel("_ybd_common_albums", EnumCollection.ActionEnum.Modify.ToString()); //检查权限 BLL.common_albums bll = new BLL.common_albums(); Model.common_albums model = bll.GetModel(this.id); model.group_id = Convert.ToInt32(txtgroup_id.Text); model.rc_title = Convert.ToString(txtrc_title.Text); model.rc_type = Convert.ToInt32(txtrc_type.Text); model.rc_data_id = Convert.ToInt32(txtrc_data_id.Text); model.thumb_path = Convert.ToString(txtthumb_path.Text); model.original_path = Convert.ToString(txtoriginal_path.Text); model.remark = Convert.ToString(txtremark.Text); model.add_time = Convert.ToDateTime(txtadd_time.Text); if (bll.Update(model)) { AddAdminLog(EnumCollection.ActionEnum.Modify.ToString(), "修改全局相册信息,主键:" + id); //记录日志 JscriptMsg("修改全局相册信息成功!", "Manage.aspx"); } else { JscriptMsg("保存过程中发生错误!", ""); } }
private void ShowInfo() { BLL.common_albums bll = new BLL.common_albums(); Model.common_albums model = bll.GetModel(" group_id = " + (int)EnumCollection.img_group.系统默认二维码logo); if (model != null) { this.txtad_data_img.Text = model.original_path; } }
private bool DoEdit(int id) { BLL.common_albums bll = new BLL.common_albums(); Model.common_albums model = bll.GetModel(id); model.original_path = this.txtad_data_img.Text.Trim(); if (bll.Update(model)) { AddAdminLog(EnumCollection.ActionEnum.Modify.ToString(), "修改系统默认二维码logo,主键:" + id); //记录日志 return(true); } else { return(false); } }
private void BindInfo() { BLL.common_albums bll = new BLL.common_albums(); Model.common_albums model = bll.GetModel(this.id); if (model == null) { JscriptMsg("信息不存在或已被删除!", "back"); return; } txtgroup_id.Text = model.group_id + ""; txtrc_title.Text = model.rc_title + ""; txtrc_type.Text = model.rc_type + ""; txtrc_data_id.Text = model.rc_data_id + ""; txtthumb_path.Text = model.thumb_path + ""; txtoriginal_path.Text = model.original_path + ""; txtremark.Text = model.remark + ""; txtadd_time.Text = model.add_time + ""; }