/// <summary> ///无分页获取列表 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <reamrks>tianzhenyun 2011-10-19</reamrks> public DataTable GetList(E_NotTraded data) { SqlParameter[] parms = { new SqlParameter("@PersonalID", SqlDbType.Int) }; parms[0].Value = data.PersonalID; return(DbHelperSQL.RunProcedureTable("ProcPI_B_NotTraded_ListSelect", parms)); }
/// <summary> /// 录入新失败 /// </summary> void NoTradedAdd() { MLMGC.Security.PersonalPage pp = new MLMGC.Security.PersonalPage(true); string name = nv["name"]; E_NotTraded data = new E_NotTraded(); data.PersonalID = pp.PersonalID; data.NotTradedID = 0; data.NotTradedName = name; int tradeid = new T_NotTraded().Add(data); HttpContext.Current.Response.Write(tradeid); }
/// <summary> /// 删除失败信息 /// </summary> void NoTradedDelete() { MLMGC.Security.PersonalPage pp = new MLMGC.Security.PersonalPage(true); int nottradedid = 0; int.TryParse(nv["nottradedid"], out nottradedid); E_NotTraded data = new E_NotTraded(); data.PersonalID = pp.PersonalID; data.NotTradedID = nottradedid; bool b = new T_NotTraded().Delete(data); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 删除一条数据 /// </summary> public int Delete(E_NotTraded data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@NotTradedID", SqlDbType.Int) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.NotTradedID; int ReturnValue = 0, irowsAffected = 0; irowsAffected = DbHelperSQL.RunProcedures("ProcEP_B_NotTraded_Delete", parms, out ReturnValue); return(ReturnValue); }
/// <summary> /// 删除一条数据 /// </summary> /// <reamrks>tianzhenyun 2011-10-19</reamrks> public bool Delete(E_NotTraded data) { SqlParameter[] parms = { new SqlParameter("@PersonalID", SqlDbType.Int), new SqlParameter("@NotTradedID", SqlDbType.Int) }; parms[0].Value = data.PersonalID; parms[1].Value = data.NotTradedID; int ReturnValue = 0, irowsAffected = 0; irowsAffected = DbHelperSQL.RunProcedures("ProcPI_B_NotTraded_Delete", parms, out ReturnValue); return(ReturnValue > 0); }
/// <summary> /// 失败是否存在 /// </summary> void NoTradedExists() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int nottradedid = 0; int.TryParse(nv["nottradedid"], out nottradedid); string name = nv["name"]; E_NotTraded data = new E_NotTraded(); data.EnterpriseID = ep.EnterpriceID; data.NotTradedID = nottradedid; data.NotTradedName = name; bool b = new T_NotTraded().Exists(data); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 增加一条数据 /// </summary> /// <reamrks>tianzhenyun 2011-10-19</reamrks> public int Add(E_NotTraded data) { SqlParameter[] parms = { new SqlParameter("@PersonalID", SqlDbType.Int), new SqlParameter("@NotTradedName", SqlDbType.NVarChar, 128) }; parms[0].Value = data.PersonalID; parms[1].Value = data.NotTradedName; int ReturnValue = 0; DbHelperSQL.RunProcedures("ProcPI_B_NotTraded_Insert", parms, out ReturnValue); data.NotTradedID = ReturnValue; return(ReturnValue); }
/// <summary> /// 录入新失败 /// </summary> void NoTradedAdd() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); string name = nv["name"]; E_NotTraded data = new E_NotTraded(); data.EnterpriseID = ep.EnterpriceID; data.NotTradedID = 0; data.NotTradedName = name; int tradeid = new T_NotTraded().Add(data); new MLMGC.BLL.Enterprise.T_Log().Add(new MLMGC.DataEntity.Enterprise.E_Log() { EnterpriseID = ep.EnterpriceID, UserID = ep.UserID, LogTitle = "添加失败理由", IP = MLMGC.COMP.Requests.GetRealIP() }); HttpContext.Current.Response.Write(tradeid); }
/// <summary> /// 得到一个对象实体 /// </summary> /// <reamrks>tianzhenyun 2011-10-19</reamrks> public E_NotTraded GetModel(E_NotTraded data) { SqlParameter[] parms = { new SqlParameter("@PersonalID", SqlDbType.Int), new SqlParameter("@NotTradedID", SqlDbType.Int) }; parms[0].Value = data.PersonalID; parms[1].Value = data.NotTradedID; DataTable dt = DbHelperSQL.RunProcedureTable("ProcPI_B_NotTraded_Select", parms); if (dt != null && dt.Rows.Count == 1) { data.NotTradedName = dt.Rows[0]["NotTradedName"].ToString(); } return(data); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(E_NotTraded data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@NotTradedID", SqlDbType.Int), new SqlParameter("@NotTradedName", SqlDbType.NVarChar, 128) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.NotTradedID; parms[2].Value = data.NotTradedName; int ReturnValue = 0, irowsAffected = 0; irowsAffected = DbHelperSQL.RunProcedures("ProcEP_B_NotTraded_Update", parms, out ReturnValue); return(ReturnValue > 0); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(E_NotTraded data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@NotTradedID", SqlDbType.Int), new SqlParameter("@NotTradedName", SqlDbType.NVarChar, 128) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.NotTradedID; parms[2].Value = data.NotTradedName; int ReturnValue = 0; DbHelperSQL.RunProcedures("ProcEP_B_NotTraded_Exists", parms, out ReturnValue); return(ReturnValue == 1); }
/// <summary> /// 删除失败信息 /// </summary> void NoTradedDelete() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int nottradedid = 0; int.TryParse(nv["nottradedid"], out nottradedid); E_NotTraded data = new E_NotTraded(); data.EnterpriseID = ep.EnterpriceID; data.NotTradedID = nottradedid; int result = new T_NotTraded().Delete(data); new MLMGC.BLL.Enterprise.T_Log().Add(new MLMGC.DataEntity.Enterprise.E_Log() { EnterpriseID = ep.EnterpriceID, UserID = ep.UserID, LogTitle = "删除失败理由", IP = MLMGC.COMP.Requests.GetRealIP() }); HttpContext.Current.Response.Write(result.ToString()); }
/// <summary> /// 修改失败状态 /// </summary> void NoTradedUpdate() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int nottradedid = 0; int.TryParse(nv["nottradedid"], out nottradedid); string name = nv["name"]; E_NotTraded data = new E_NotTraded(); data.EnterpriseID = ep.EnterpriceID; data.NotTradedID = nottradedid; data.NotTradedName = name; bool b = new T_NotTraded().Update(data); new MLMGC.BLL.Enterprise.T_Log().Add(new MLMGC.DataEntity.Enterprise.E_Log() { EnterpriseID = ep.EnterpriceID, UserID = ep.UserID, LogTitle = "修改失败理由", IP = MLMGC.COMP.Requests.GetRealIP() }); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 获取显示失败状态信息 /// </summary> void NoTradedShow() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int nottradedid = 0; int.TryParse(nv["nottradedid"], out nottradedid); E_NotTraded data = new E_NotTraded(); data.EnterpriseID = ep.EnterpriceID; data.NotTradedID = nottradedid; data = new T_NotTraded().GetModel(data); if (data == null) { data = new E_NotTraded(); data.NotTradedID = 0; } JsonObjectCollection colDR = new JsonObjectCollection(); colDR.Add(new JsonStringValue("id", data.NotTradedID.ToString())); colDR.Add(new JsonStringValue("name", data.NotTradedName)); HttpContext.Current.Response.Write(colDR.ToString()); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(E_NotTraded data) { return(dal.Delete(data)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(E_NotTraded data) { return(dal.Add(data)); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(E_NotTraded data) { return(dal.Update(data)); }
/// <summary> /// 删除一条数据 /// </summary> public int Delete(E_NotTraded data) { return(dal.Delete(data)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(E_NotTraded data) { return(dal.Exists(data)); }
/// <summary> /// 得到一个对象实体 /// </summary> public E_NotTraded GetModel(E_NotTraded data) { return(dal.GetModel(data)); }
/// <summary> ///无分页获取列表 /// </summary> /// <param name="data"></param> /// <returns></returns> public DataTable GetList(E_NotTraded data) { return(dal.GetList(data)); }