private bool DoEdit(int _id) { bool result = false; Cms.BLL.C_user_oauth_app bll = new Cms.BLL.C_user_oauth_app(); Cms.Model.C_user_oauth_app model = bll.GetModel(_id); model.title = txtTitle.Text.Trim(); if (cbIsLock.Checked == true) { model.is_lock = 0; } else { model.is_lock = 1; } model.sort_id = int.Parse(txtSortId.Text.Trim()); model.api_path = txtApiPath.Text.Trim(); model.app_id = txtAppId.Text.Trim(); model.app_key = txtAppKey.Text.Trim(); model.img_url = txtImgUrl.Value.Trim(); model.remark = txtRemark.Text; if (bll.Update(model)) { adminUser.AddAdminLog(DTEnums.ActionEnum.Edit.ToString(), model.title); //记录日志 result = true; } return(result); }
private void ShowInfo(int _id) { Cms.BLL.C_user_oauth_app bll = new Cms.BLL.C_user_oauth_app(); Cms.Model.C_user_oauth_app model = bll.GetModel(_id); txtTitle.Text = model.title; if (model.is_lock == 0) { cbIsLock.Checked = true; } else { cbIsLock.Checked = false; } txtSortId.Text = model.sort_id.ToString(); txtApiPath.Text = model.api_path; txtAppId.Text = model.app_id; txtAppKey.Text = model.app_key; txtImgUrl.Value = model.img_url; txtRemark.Text = model.remark; }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Cms.Model.C_user_oauth_app model) { return(dal.Update(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(Cms.Model.C_user_oauth_app model) { return(dal.Add(model)); }