/// <summary> /// 查询所有审核未通过的状态信息 /// </summary> /// <returns></returns> public IList <M_AuditingState> GetNoPassState() { IList <M_AuditingState> list = new List <M_AuditingState>(); M_AuditingState mas1 = new M_AuditingState(); mas1.StateCode = 0; mas1.StateName = "待审核"; mas1.StateType = "系统"; M_AuditingState mas3 = new M_AuditingState(); mas3.StateCode = -2; mas3.StateName = "回收站"; mas3.StateType = "系统"; list.Add(mas1); list.Add(mas3); foreach (DataRow row in Sel().Rows) { M_AuditingState mas = new M_AuditingState(); mas.StateCode = Convert.ToInt32(row["StateCode"]); mas.StateName = row["StateName"].ToString(); mas.StateType = row["StateType"].ToString(); list.Add(mas); } return(list); }
/// <summary> /// 查询所有审核通过的状态信息 /// </summary> /// <returns></returns> public IList <M_AuditingState> GetPassState() { foreach (DataRow row in Sel().Rows) { M_AuditingState mas = new M_AuditingState(); mas.StateCode = Convert.ToInt32(row["StateCode"]); mas.StateName = row["StateName"].ToString(); mas.StateType = row["StateType"].ToString(); codeList.Add(mas); } return(codeList.OrderBy(p => p.StateCode).ToList()); }
/// <summary> /// 删除审核状态信息 /// </summary> /// <returns></returns> public bool DelAuditingStateByStateCode(M_AuditingState model) { string strSql = "delete from ZL_AuditingState where stateCode=" + model.StateCode; int result = SqlHelper.ExecuteNonQuery(CommandType.Text, strSql, null); if (result > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加审核状态 /// </summary> /// <param name="auditingstate"></param> /// <returns></returns> public bool AddAudtingState(M_AuditingState model) { string strSql = "insert into ZL_AuditingState(stateCode,stateName,stateType) values(@stateCode,@stateName,@stateType)"; SqlParameter[] param = new SqlParameter[] { new SqlParameter("@stateCode", model.StateCode), new SqlParameter("@stateName", model.StateName), new SqlParameter("@stateType", model.StateType) }; if (SqlHelper.ExecuteNonQuery(CommandType.Text, strSql, param) > 0) { return(true); } else { return(false); } }
protected void btnSave_Click(object sender, EventArgs e) { string stateCode = this.ddlStateCode.SelectedValue.Trim(); string stateName = this.stateName.Value.Trim(); if (stateName != null && !"".Equals(stateName)) { M_AuditingState mas = new M_AuditingState(); mas.StateCode = Convert.ToInt32(stateCode); mas.StateName = stateName; mas.StateType = "自定义"; if (bas.AddAudtingState(mas)) { function.WriteSuccessMsg("保存稿件状态码成功!", CustomerPageAction.customPath2 + "Content/AddAuditingState.aspx"); } } }
public B_AuditingState() { TbName = initMod.TbName; PK = initMod.PK; M_AuditingState mas1 = new M_AuditingState(); mas1.StateCode = 0; mas1.StateName = "待审核"; mas1.StateType = "系统"; M_AuditingState mas2 = new M_AuditingState(); mas2.StateCode = 99; mas2.StateName = "已审核"; mas2.StateType = "系统"; M_AuditingState mas3 = new M_AuditingState(); mas3.StateCode = -2; mas3.StateName = "回收站"; mas3.StateType = "系统"; codeList.Add(mas1); codeList.Add(mas2); codeList.Add(mas3); }
public int insert(M_AuditingState model) { return(DBCenter.Insert(model)); }
/// <summary> /// 根据ID更新 /// </summary> public bool UpdateByID(M_AuditingState model) { return(DBCenter.UpdateByID(model, model.StateCode)); }
public int insert(M_AuditingState model) { return(Sql.insert(TbName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model))); }
/// <summary> /// 根据ID更新 /// </summary> public bool UpdateByID(M_AuditingState model) { return(Sql.UpdateByIDs(TbName, PK, model.StateCode.ToString(), model.GetFieldAndPara(), model.GetParameters())); }