///<summary> ///添加方法,返回Boolean类型,为true表示操作成功,否则操作失败 ///生成时间:2010-8-27 22:00:49 ///</summary> public Boolean AddSys_module_operate(Sys_module_operate sys_module_operate) { MySqlParameter[] param = new MySqlParameter[] { new MySqlParameter("?Operate_text", sys_module_operate.Operate_text), new MySqlParameter("?status", sys_module_operate.Status) }; return(MySqlHelper.ExecuteNonQuery(SQL_INSERT, param) > 0); }
public int InsertSys_module_operate(Sys_module_operate sys_module_operate) { MySqlParameter[] param = new MySqlParameter[] { new MySqlParameter("?Operate_text", sys_module_operate.Operate_text), new MySqlParameter("?status", sys_module_operate.Status) }; return(Convert.ToInt32(MySqlHelper.ExecuteScalar(SQL_INSERTRETURNID, param))); }
///<summary> ///修改方法,返回Boolean类型,为true表示操作成功,否则操作失败 ///生成时间:2010-8-27 22:00:49 ///</summary> public Boolean UpdateSys_module_operate(Sys_module_operate sys_module_operate) { MySqlParameter[] param = new MySqlParameter[] { new MySqlParameter("?Operate_text", sys_module_operate.Operate_text), new MySqlParameter("?status", sys_module_operate.Status), new MySqlParameter("?OperateID", sys_module_operate.OperateID) }; return(MySqlHelper.ExecuteNonQuery(SQL_UPDATE, param) > 0); }
public bool UpdateModuleOperateStatus(int OperateID) { if (Session[Util.ProjectConfig.ADMINUSER] == null) { return(false); } Sys_module_operate operate = Sys_module_operateManager.GetSys_module_operateByPK(OperateID); operate.Status = operate.Status == "1" ? "0" : "1"; return(Sys_module_operateManager.UpdateSys_module_operate(operate)); }
public bool UpdateModuleOperate(string Operate_text, int OperateID) { if (Session[Util.ProjectConfig.ADMINUSER] == null) { return(false); } Sys_module_operate operate = Sys_module_operateManager.GetSys_module_operateByPK(OperateID); operate.Operate_text = Operate_text; return(Sys_module_operateManager.UpdateSys_module_operate(operate)); }
///<sumary> ///修改信息 ///时间:2010-8-27 22:01:15 ///</sumary> public static Boolean UpdateSys_module_operate(Sys_module_operate sys_module_operate) { try { return(sys_module_operateService.UpdateSys_module_operate(sys_module_operate)); } catch (Exception ex) { //可以记录到异常日志 return(false); } }
public bool Updatestatus(int OperateID) { IList <Sys_module_operate> smos = GetModuleOperateById(OperateID); bool reval = false; if (smos.Count > 0) { Sys_module_operate smo = smos[0]; if (smo.Status.ToString() == "1") { reval = UpdateModuleOperateStatus("0", OperateID); } else { reval = UpdateModuleOperateStatus("1", OperateID); } } return(reval); }
public IList <Sys_module_operate> GetModuleOperateBySql(string sql, params MySqlParameter[] param) { IList <Sys_module_operate> list = new List <Sys_module_operate>(); using (MySqlDataReader reader = MySqlHelper.ExecuteReader(sql, param)) { while (reader.Read()) { //Sys_module_operate sysmoduleOperate = new Sys_module_operate(reader.GetInt32("OperateID"), reader.GetString("Operate_text"), reader.GetChar("Status")); Sys_module_operate sysmoduleOperate = new Sys_module_operate(); sysmoduleOperate.OperateID = reader.GetInt32("OperateID"); sysmoduleOperate.Operate_text = reader.GetString("Operate_text"); sysmoduleOperate.Status = reader.GetString("status"); list.Add(sysmoduleOperate); } reader.Close(); } return(list); }
public string AddModuleOperate(string Operate_text, string status) { if (Session[Util.ProjectConfig.ADMINUSER] == null) { return(""); } try { Sys_module_operate operate = new Sys_module_operate(); operate.Operate_text = Operate_text; operate.Status = status; int operateID = Sys_module_operateManager.InsertSys_module_operate(operate); operate.OperateID = operateID; return(DAL.ObjectToJson.ObjectsToJson(operate)); } catch (Exception) { return("none"); } }
public static int InsertSys_module_operate(Sys_module_operate operate) { return(sys_module_operateService.InsertSys_module_operate(operate)); }