/// <summary> ///无分页获取列表 /// </summary> /// <param name="data"></param> /// <returns></returns> /// <remarks>tianzhenyun 2011-10-19</remarks> public DataTable GetList(E_Wish data) { SqlParameter[] parms = { new SqlParameter("@PersonalID", SqlDbType.Int) }; parms[0].Value = data.PersonalID; return(DbHelperSQL.RunProcedureTable("ProcPI_B_Wish_ListSelect", parms)); }
/// <summary> /// 删除意向进展信息 /// </summary> void WishDelete() { //MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); MLMGC.Security.PersonalPage pp = new MLMGC.Security.PersonalPage(true); int wishid = int.Parse(nv["wishid"]); E_Wish data = new E_Wish(); data.PersonalID = pp.PersonalID; data.WishID = wishid; bool b = new T_Wish().Delete(data); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 删除一条数据 /// </summary> public int Delete(E_Wish data) { SqlParameter[] parms = { new SqlParameter("@EnterpriseID", SqlDbType.Int), new SqlParameter("@WishID", SqlDbType.Int) }; parms[0].Value = data.EnterpriseID; parms[1].Value = data.WishID; int ReturnValue = 0, irowsAffected = 0; irowsAffected = DbHelperSQL.RunProcedures("ProcEP_B_Wish_Delete", parms, out ReturnValue); return(ReturnValue); }
/// <summary> /// 意向进展状态是否存在 /// </summary> void WishExists() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int wishid = int.Parse(nv["wishid"]); string name = nv["name"]; E_Wish data = new E_Wish(); data.EnterpriseID = ep.EnterpriceID; data.WishID = wishid; data.WishName = name; bool b = new T_Wish().Exists(data); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 删除一条数据 /// </summary> /// <remarks>tianzhenyun 2011-10-19</remarks> public bool Delete(E_Wish data) { SqlParameter[] parms = { new SqlParameter("@PersonalID", SqlDbType.Int), new SqlParameter("@WishID", SqlDbType.Int) }; parms[0].Value = data.PersonalID; parms[1].Value = data.WishID; int ReturnValue = 0, irowsAffected = 0; irowsAffected = DbHelperSQL.RunProcedures("ProcPI_B_Wish_Delete", parms, out ReturnValue); return(ReturnValue > 0); }
/// <summary> /// 删除意向进展信息 /// </summary> void WishDelete() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int wishid = int.Parse(nv["wishid"]); E_Wish data = new E_Wish(); data.EnterpriseID = ep.EnterpriceID; data.WishID = wishid; int result = new T_Wish().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 WishAdd() { //MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); MLMGC.Security.PersonalPage pp = new MLMGC.Security.PersonalPage(true); string name = nv["name"]; int percent = int.Parse(nv["percent"]); E_Wish data = new E_Wish(); data.PersonalID = pp.PersonalID; data.WishID = 0; data.WishName = name; data.WishPercent = percent; int tradeid = new T_Wish().Add(data); HttpContext.Current.Response.Write(tradeid); }
/// <summary> /// 修改意向进展状态 /// </summary> void WishUpdate() { //MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); MLMGC.Security.PersonalPage pp = new MLMGC.Security.PersonalPage(true); int wishid = int.Parse(nv["wishid"]); string name = nv["name"]; int percent = int.Parse(nv["percent"]); E_Wish data = new E_Wish(); data.PersonalID = pp.PersonalID; data.WishID = wishid; data.WishName = name; data.WishPercent = percent; bool b = new T_Wish().Update(data); HttpContext.Current.Response.Write(b ? "1" : "0"); }
/// <summary> /// 是否存在该记录 /// </summary> /// <remarks>tianzhenyun 2011-10-19</remarks> public bool Exists(E_Wish data) { SqlParameter[] parms = { new SqlParameter("@PersonalID", SqlDbType.Int), new SqlParameter("@WishID", SqlDbType.Int), new SqlParameter("@WishName", SqlDbType.NVarChar, 128) }; parms[0].Value = data.PersonalID; parms[1].Value = data.WishID; parms[2].Value = data.WishName; int ReturnValue = 0; DbHelperSQL.RunProcedures("ProcPI_B_Wish_Exists", parms, out ReturnValue); return(ReturnValue == 1); }
/// <summary> /// 增加一条数据 /// </summary> /// <remarks>tianzhenyun 2011-10-19</remarks> public int Add(E_Wish data) { SqlParameter[] parms = { new SqlParameter("@PersonalID", SqlDbType.Int), new SqlParameter("@WishName", SqlDbType.NVarChar,128), new SqlParameter("@WishPercent", SqlDbType.TinyInt) }; parms[0].Value = data.PersonalID; parms[1].Value = data.WishName; parms[2].Value = data.WishPercent; int ReturnValue = 0; DbHelperSQL.RunProcedures("ProcPI_B_Wish_Insert", parms, out ReturnValue); data.WishID = ReturnValue; return(ReturnValue); }
/// <summary> /// 得到一个对象实体 /// </summary> /// <remarks>tianzhenyun 2011-10-19</remarks> public E_Wish GetModel(E_Wish data) { SqlParameter[] parms = { new SqlParameter("@PersonalID", SqlDbType.Int), new SqlParameter("@WishID", SqlDbType.Int) }; parms[0].Value = data.PersonalID; parms[1].Value = data.WishID; DataTable dt = DbHelperSQL.RunProcedureTable("ProcPI_B_Wish_Select", parms); if (dt != null && dt.Rows.Count == 1) { data.WishName = dt.Rows[0]["WishName"].ToString(); data.WishPercent = int.Parse(dt.Rows[0]["WishPercent"].ToString()); } return(data); }
/// <summary> /// 更新一条数据 /// </summary> /// <remarks>tianzhenyun 2011-10-19</remarks> public bool Update(E_Wish data) { SqlParameter[] parms = { new SqlParameter("@PersonalID", SqlDbType.Int), new SqlParameter("@WishID", SqlDbType.Int), new SqlParameter("@WishName", SqlDbType.NVarChar,128), new SqlParameter("@WishPercent", SqlDbType.TinyInt) }; parms[0].Value = data.PersonalID; parms[1].Value = data.WishID; parms[2].Value = data.WishName; parms[3].Value = data.WishPercent; int ReturnValue = 0, irowsAffected = 0; irowsAffected = DbHelperSQL.RunProcedures("ProcPI_B_Wish_Update", parms, out ReturnValue); return(ReturnValue > 0); }
/// <summary> /// 录入新意向进展状态 /// </summary> void WishAdd() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); string name = nv["name"]; int percent = int.Parse(nv["percent"]); E_Wish data = new E_Wish(); data.EnterpriseID = ep.EnterpriceID; data.WishID = 0; data.WishName = name; data.WishPercent = percent; int tradeid = new T_Wish().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> void WishShow() { MLMGC.Security.EnterprisePage ep = new MLMGC.Security.EnterprisePage(true); int wishid = int.Parse(nv["wishid"]); E_Wish data = new E_Wish(); data.EnterpriseID = ep.EnterpriceID; data.WishID = wishid; data = new T_Wish().GetModel(data); if (data == null) { data = new E_Wish(); data.WishID = 0; } JsonObjectCollection colDR = new JsonObjectCollection(); colDR.Add(new JsonStringValue("id", data.WishID.ToString())); colDR.Add(new JsonStringValue("name", data.WishName)); colDR.Add(new JsonStringValue("percent", data.WishPercent.ToString())); HttpContext.Current.Response.Write(colDR.ToString()); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(E_Wish data) { return(dal.Add(data)); }
/// <summary> /// 是否存在该记录 /// </summary> public bool Exists(E_Wish data) { return(dal.Exists(data)); }
/// <summary> /// 得到一个对象实体 /// </summary> public E_Wish GetModel(E_Wish data) { return(dal.GetModel(data)); }
/// <summary> /// 删除一条数据 /// </summary> public int Delete(E_Wish data) { return(dal.Delete(data)); }
/// <summary> ///无分页获取列表 /// </summary> /// <param name="data"></param> /// <returns></returns> public DataTable GetList(E_Wish data) { return(dal.GetList(data)); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(E_Wish data) { return(dal.Update(data)); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(E_Wish data) { return(dal.Delete(data)); }