Files
g.hnyhua.cn/Mtxfw.DAL/user_Results.cs
2026-02-07 15:48:27 +08:00

1435 lines
64 KiB
C#

using System;
using System.Data;
using System.Text;
using System.Data.SqlClient;
namespace Mtxfw.DAL
{
/// <summary>
/// 数据访问类:user_Results
/// </summary>
public partial class user_Results : Mtxfw.Utility.Myabstract
{
public user_Results()
: base("user_Results")
{ }
/// <summary>
/// 增加一条数据
/// </summary>
public Int64 Add(Mtxfw.Model.user_Results model)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("insert into user_Results(");
strSql.Append("MemberId,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,Totalmoney,conent,UserId,ListNumber,Managers,hasRead,Sended,Seef,utype,addtime,gtype)");
strSql.Append(" values (");
strSql.Append("@MemberId,@b0,@b1,@b2,@b3,@b4,@b5,@b6,@b7,@b8,@b9,@b10,@b11,@b12,@b13,@b14,@b15,@b16,@b17,@b18,@Totalmoney,@conent,@UserId,@ListNumber,@Managers,@hasRead,@Sended,@Seef,@utype,@addtime,@gtype)");
strSql.Append(";select SCOPE_IDENTITY()");
SqlParameter[] parameters = {
new SqlParameter("@MemberId", SqlDbType.Int),
new SqlParameter("@b0", SqlDbType.Money),
new SqlParameter("@b1", SqlDbType.Money),
new SqlParameter("@b2", SqlDbType.Money),
new SqlParameter("@b3", SqlDbType.Money),
new SqlParameter("@b4", SqlDbType.Money),
new SqlParameter("@b5", SqlDbType.Money),
new SqlParameter("@b6", SqlDbType.Money),
new SqlParameter("@b7", SqlDbType.Money),
new SqlParameter("@b8", SqlDbType.Money),
new SqlParameter("@b9", SqlDbType.Money),
new SqlParameter("@b10", SqlDbType.Money),
new SqlParameter("@b11", SqlDbType.Money),
new SqlParameter("@b12", SqlDbType.Money),
new SqlParameter("@b13", SqlDbType.Money),
new SqlParameter("@b14", SqlDbType.Money),
new SqlParameter("@b15", SqlDbType.Money),
new SqlParameter("@b16", SqlDbType.Money),
new SqlParameter("@b17", SqlDbType.Money),
new SqlParameter("@b18", SqlDbType.Money),
new SqlParameter("@Totalmoney", SqlDbType.Money),
new SqlParameter("@conent", SqlDbType.Text),
new SqlParameter("@UserId", SqlDbType.Int),
new SqlParameter("@ListNumber", SqlDbType.VarChar,50),
new SqlParameter("@Managers", SqlDbType.VarChar,250),
new SqlParameter("@hasRead", SqlDbType.Int),
new SqlParameter("@Sended", SqlDbType.Int),
new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@utype", SqlDbType.VarChar,50),
new SqlParameter("@addtime", SqlDbType.DateTime),
new SqlParameter("@gtype", SqlDbType.Int)};
parameters[0].Value = model.MemberId;
parameters[1].Value = model.b0;
parameters[2].Value = model.b1;
parameters[3].Value = model.b2;
parameters[4].Value = model.b3;
parameters[5].Value = model.b4;
parameters[6].Value = model.b5;
parameters[7].Value = model.b6;
parameters[8].Value = model.b7;
parameters[9].Value = model.b8;
parameters[10].Value = model.b9;
parameters[11].Value = model.b10;
parameters[12].Value = model.b11;
parameters[13].Value = model.b12;
parameters[14].Value = model.b13;
parameters[15].Value = model.b14;
parameters[16].Value = model.b15;
parameters[17].Value = model.b16;
parameters[18].Value = model.b17;
parameters[19].Value = model.b18;
parameters[20].Value = model.Totalmoney;
parameters[21].Value = model.conent;
parameters[22].Value = model.UserId;
parameters[23].Value = model.ListNumber;
parameters[24].Value = model.Managers;
parameters[25].Value = model.hasRead;
parameters[26].Value = model.Sended;
parameters[27].Value = model.Seef;
parameters[28].Value = model.utype;
parameters[29].Value = model.addtime;
parameters[30].Value = model.gtype;
string obj = Mtxfw.Utility.SqlDbHelper_U.GetObject(strSql.ToString(), parameters).ToString();
if (obj == "")
{
return 0;
}
else
{
return Convert.ToInt64(obj);
}
}
/// <summary>
/// 更新一条数据
/// </summary>
public int Update(Mtxfw.Model.user_Results model)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("b0=@b0,b1=@b1,b2=@b2,b3=@b3,b4=@b4,b5=@b5,b6=@b6,b7=@b7,b8=@b8,b9=@b9,b10=@b10,b11=@b11,b12=@b12,b13=@b13,b14=@b14,b15=@b15,Totalmoney=@Totalmoney,seef=@seef,seeftime=@seeftime");
strSql.Append(" Where Id=@Id");
SqlParameter[] parameters = {
new SqlParameter("@b0", SqlDbType.Money),
new SqlParameter("@b1", SqlDbType.Money),
new SqlParameter("@b2", SqlDbType.Money),
new SqlParameter("@b3", SqlDbType.Money),
new SqlParameter("@b4", SqlDbType.Money),
new SqlParameter("@b5", SqlDbType.Money),
new SqlParameter("@b6", SqlDbType.Money),
new SqlParameter("@b7", SqlDbType.Money),
new SqlParameter("@b8", SqlDbType.Money),
new SqlParameter("@b9", SqlDbType.Money),
new SqlParameter("@b10", SqlDbType.Money),
new SqlParameter("@b11", SqlDbType.Money),
new SqlParameter("@b12", SqlDbType.Money),
new SqlParameter("@b13", SqlDbType.Money),
new SqlParameter("@b14", SqlDbType.Money),
new SqlParameter("@b15", SqlDbType.Money),
new SqlParameter("@Totalmoney", SqlDbType.Money),
new SqlParameter("@seef", SqlDbType.Int),
new SqlParameter("@seeftime", SqlDbType.DateTime),
new SqlParameter("@Id", SqlDbType.Int)};
parameters[0].Value = model.b0;
parameters[1].Value = model.b1;
parameters[2].Value = model.b2;
parameters[3].Value = model.b3;
parameters[4].Value = model.b4;
parameters[5].Value = model.b5;
parameters[6].Value = model.b6;
parameters[7].Value = model.b7;
parameters[8].Value = model.b8;
parameters[9].Value = model.b9;
parameters[10].Value = model.b10;
parameters[11].Value = model.b11;
parameters[12].Value = model.b12;
parameters[13].Value = model.b13;
parameters[14].Value = model.b14;
parameters[15].Value = model.b15;
parameters[16].Value = model.Totalmoney;
parameters[17].Value = model.Seef;
parameters[18].Value = model.seeftime;
parameters[19].Value = model.Id;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新一条数据
/// </summary>
public int Update(Mtxfw.Model.user_Results model,string ifmonth, DateTime dt)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("b0=@b0,b1=@b1,b2=@b2,b3=@b3,b4=@b4,b5=@b5,b6=@b6,b7=@b7,b8=@b8,b9=@b9,b10=@b10,b11=@b11,b12=@b12,b13=@b13,b14=@b14,b15=@b15,b16=@b16,b17=@b17,b18=@b18,Totalmoney=@Totalmoney");
strSql.Append(" Where MemberId=@MemberId And utype=@utype And DateDiff(" + ifmonth + ",addtime,'" + dt + "')=0");
SqlParameter[] parameters = {
new SqlParameter("@MemberId", SqlDbType.Int),
new SqlParameter("@b0", SqlDbType.Money),
new SqlParameter("@b1", SqlDbType.Money),
new SqlParameter("@b2", SqlDbType.Money),
new SqlParameter("@b3", SqlDbType.Money),
new SqlParameter("@b4", SqlDbType.Money),
new SqlParameter("@b5", SqlDbType.Money),
new SqlParameter("@b6", SqlDbType.Money),
new SqlParameter("@b7", SqlDbType.Money),
new SqlParameter("@b8", SqlDbType.Money),
new SqlParameter("@b9", SqlDbType.Money),
new SqlParameter("@b10", SqlDbType.Money),
new SqlParameter("@b11", SqlDbType.Money),
new SqlParameter("@b12", SqlDbType.Money),
new SqlParameter("@b13", SqlDbType.Money),
new SqlParameter("@b14", SqlDbType.Money),
new SqlParameter("@b15", SqlDbType.Money),
new SqlParameter("@b16", SqlDbType.Money),
new SqlParameter("@b17", SqlDbType.Money),
new SqlParameter("@b18", SqlDbType.Money),
new SqlParameter("@Totalmoney", SqlDbType.Money),
new SqlParameter("@utype", SqlDbType.VarChar,50)};
parameters[0].Value = model.MemberId;
parameters[1].Value = model.b0;
parameters[2].Value = model.b1;
parameters[3].Value = model.b2;
parameters[4].Value = model.b3;
parameters[5].Value = model.b4;
parameters[6].Value = model.b5;
parameters[7].Value = model.b6;
parameters[8].Value = model.b7;
parameters[9].Value = model.b8;
parameters[10].Value = model.b9;
parameters[11].Value = model.b10;
parameters[12].Value = model.b11;
parameters[13].Value = model.b12;
parameters[14].Value = model.b13;
parameters[15].Value = model.b14;
parameters[16].Value = model.b15;
parameters[17].Value = model.b16;
parameters[18].Value = model.b17;
parameters[19].Value = model.b18;
parameters[20].Value = model.Totalmoney;
parameters[21].Value = model.utype;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新OrderIds字段
/// </summary>
public int UpdateOrderIds(string OrderIds, Int64 Id)
{
String sql = "update [user_Results] set OrderIds=@OrderIds where Id=@Id";
SqlParameter[] para = { new SqlParameter("@OrderIds", SqlDbType.VarChar,8000),
new SqlParameter("@Id", SqlDbType.BigInt) };
para[0].Value = OrderIds;
para[1].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 更新隐藏字段
/// </summary>
public int UpdateIFHidden(int IFHidden, int utype, string strDiff,int Num, Int64 Id)
{
String sql = "update [user_Results] set IFHidden=@IFHidden where Id=@Id";
if (Id < 0)
{
sql = "update [user_Results] set IFHidden=@IFHidden where utype=@utype And DateDiff(" + strDiff + ",addTime,GetDate())>" + Num;
}
SqlParameter[] para = { new SqlParameter("@IFHidden", SqlDbType.Int),
new SqlParameter("@utype", SqlDbType.Int),
new SqlParameter("@Id", SqlDbType.BigInt) };
para[0].Value = IFHidden;
para[1].Value = utype;
para[2].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 已阅读
/// </summary>
public int UpdatehasRead(int hasRead, Int64 Id)
{
String sql = "update [user_Results] set hasRead=@hasRead where Id=@Id";
SqlParameter[] para = { new SqlParameter("@hasRead", SqlDbType.Int),
new SqlParameter("@Id", SqlDbType.BigInt) };
para[0].Value = hasRead;
para[1].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 已推送
/// </summary>
public int UpdateSended(int Sended, Int64 Id)
{
String sql = "update [user_Results] set Sended=@Sended where Id=@Id";
SqlParameter[] para = { new SqlParameter("@Sended", SqlDbType.Int),
new SqlParameter("@Id", SqlDbType.BigInt) };
para[0].Value = Sended;
para[1].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 审核
/// </summary>
public int UpdateSeef(int Seef,DateTime dt, Int64 Id)
{
String sql = "update [user_Results] set Seef=@Seef,seeftime=@dt where Id=@Id";
SqlParameter[] para = { new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@dt", SqlDbType.DateTime),
new SqlParameter("@Id", SqlDbType.BigInt) };
para[0].Value = Seef;
para[1].Value = dt;
para[2].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 审核
/// </summary>
public int UpdateSeef(int Seef, DateTime dt, string where)
{
String sql = "update [user_Results] set Seef=@Seef,seeftime=@dt where " + where;
SqlParameter[] para = { new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@dt", SqlDbType.DateTime) };
para[0].Value = Seef;
para[1].Value = dt;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 设为已结算
/// </summary>
public int UpdateSeef(int Seef, DateTime dt, string msg, Int64 Id)
{
String sql = "update [user_Results] set Seef=@Seef,seeftime=@dt,Managers=@msg where Id=@Id";
SqlParameter[] para = { new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@dt", SqlDbType.DateTime),
new SqlParameter("@msg", SqlDbType.VarChar,250),
new SqlParameter("@Id", SqlDbType.BigInt)};
para[0].Value = Seef;
para[1].Value = dt;
para[2].Value = msg;
para[3].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 设为已结算
/// </summary>
public int UpdateSeef(int Seef, DateTime dt, int IFDelete, int MemberId, string utype)
{
String sql = "update [user_Results] set Seef=@Seef,seeftime=@dt where Seef<>@Seef And IFDelete=@IFDelete And MemberId=@MemberId And utype=@utype";
SqlParameter[] para = { new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@dt", SqlDbType.DateTime),
new SqlParameter("@IFDelete", SqlDbType.Int),
new SqlParameter("@MemberId", SqlDbType.Int),
new SqlParameter("@utype", SqlDbType.VarChar,50)};
para[0].Value = Seef;
para[1].Value = dt;
para[2].Value = IFDelete;
para[3].Value = MemberId;
para[4].Value = utype;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 审核
/// </summary>
public int UpdateSeefandUserId(int Seef, DateTime dt, int UserId, Int64 Id)
{
String sql = "update [user_Results] set Seef=@Seef,seeftime=@dt,UserId=@UserId where Id=@Id";
SqlParameter[] para = { new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@dt", SqlDbType.DateTime),
new SqlParameter("@UserId", SqlDbType.Int),
new SqlParameter("@Id", SqlDbType.BigInt) };
para[0].Value = Seef;
para[1].Value = dt;
para[2].Value = UserId;
para[3].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 审核
/// </summary>
public int UpdateSeefandUserId(int Seef, int UserId, Int64 Id)
{
String sql = "update [user_Results] set Seef=@Seef,seeftime=addtime,UserId=@UserId where Id=@Id";
SqlParameter[] para = { new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@UserId", SqlDbType.Int),
new SqlParameter("@Id", SqlDbType.BigInt) };
para[0].Value = Seef;
para[1].Value = UserId;
para[2].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 更新ListNumber
/// </summary>
public int UpdateListNumber(string ListNumber, Int64 ID)
{
String sql = "update [user_Results] set ListNumber=@ListNumber where ID=@ID";
SqlParameter[] para = { new SqlParameter("@ListNumber", SqlDbType.VarChar,250),
new SqlParameter("@ID", SqlDbType.BigInt) };
para[0].Value = ListNumber;
para[1].Value = ID;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 审核
/// </summary>
public int UpdateSeefandManagers(int Seef, DateTime dt, string Managers, Int64 Id)
{
String sql = "update [user_Results] set Seef=@Seef,seeftime=@dt,Managers=@Managers where Id=@Id";
SqlParameter[] para = { new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@dt", SqlDbType.DateTime),
new SqlParameter("@Managers", SqlDbType.VarChar,250),
new SqlParameter("@Id", SqlDbType.BigInt) };
para[0].Value = Seef;
para[1].Value = dt;
para[2].Value = Managers;
para[3].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 审核
/// </summary>
public int UpdateSeefandManagers(int Seef, DateTime dt, string Managers, string conent, Int64 Id)
{
String sql = "update [user_Results] set Seef=@Seef,seeftime=@dt,Managers=@Managers,conent=@conent where Id=@Id";
SqlParameter[] para = { new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@dt", SqlDbType.DateTime),
new SqlParameter("@Managers", SqlDbType.VarChar,8000),
new SqlParameter("@conent", SqlDbType.VarChar,8000),
new SqlParameter("@Id", SqlDbType.BigInt) };
para[0].Value = Seef;
para[1].Value = dt;
para[2].Value = Managers;
para[3].Value = conent;
para[4].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 重新上传图片
/// </summary>
public int UpdateManagers(string Managers, Int64 Id)
{
String sql = "update [user_Results] set Managers=@Managers where Id=@Id";
SqlParameter[] para = {
new SqlParameter("@Managers", SqlDbType.VarChar,250),
new SqlParameter("@Id", SqlDbType.BigInt) };
para[0].Value = Managers;
para[1].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 更新LDR
/// </summary>
public int UpdateLDR(string LDR, Int64 ID)
{
String sql = "update [user_Results] set LDR=@LDR where ID=@ID";
SqlParameter[] para = { new SqlParameter("@LDR", SqlDbType.VarChar,8000),
new SqlParameter("@ID", SqlDbType.BigInt) };
para[0].Value = LDR;
para[1].Value = ID;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 假删除
/// </summary>
public int UpdateIFDelete(int IFDelete, string IFDeleteTime, Int64 Id)
{
String sql = "update [user_Results] set IFDelete=@IFDelete,IFDeleteTime=@IFDeleteTime where Id=@Id";
SqlParameter[] para = { new SqlParameter("@IFDelete", SqlDbType.Int),
new SqlParameter("@IFDeleteTime", SqlDbType.VarChar,50),
new SqlParameter("@Id", SqlDbType.BigInt) };
para[0].Value = IFDelete;
para[1].Value = IFDeleteTime;
para[2].Value = Id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 假删除
/// </summary>
public int UpdateIFDelete(int IFDelete, string IFDeleteTime, string where)
{
String sql = "update [user_Results] set IFDelete=@IFDelete,IFDeleteTime=@IFDeleteTime where " + where;
SqlParameter[] para = { new SqlParameter("@IFDelete", SqlDbType.Int),
new SqlParameter("@IFDeleteTime", SqlDbType.VarChar,50) };
para[0].Value = IFDelete;
para[1].Value = IFDeleteTime;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 更新金额
/// </summary>
public int Updatemoney(string Selmoney, Double SelValuemoney, string Where)
{
String sql = "update [user_Results] set " + Selmoney + "=@SelValuemoney where " + Where;
SqlParameter[] para = { new SqlParameter("@SelValuemoney", SqlDbType.Money)};
para[0].Value = SelValuemoney;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 更新金额
/// </summary>
public int Updatemoney2(string Selmoney, Double SelValuemoney, string Where)
{
String sql = "update [user_Results] set " + Selmoney + "=" + Selmoney + "+@SelValuemoney where " + Where;
SqlParameter[] para = { new SqlParameter("@SelValuemoney", SqlDbType.Money) };
para[0].Value = SelValuemoney;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 更新MemberId
/// </summary>
public int UpdateMemberId(int MemberId, string Where)
{
String sql = "update [user_Results] set MemberId=@MemberId where " + Where;
SqlParameter[] para = { new SqlParameter("@MemberId", SqlDbType.Int) };
para[0].Value = MemberId;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 更新conent
/// </summary>
public int Updateconent(string conent, Int64 id)
{
String sql = "update [user_Results] set conent=@conent where ID=@ID";
SqlParameter[] para = {
new SqlParameter("@conent", SqlDbType.NText),
new SqlParameter("@ID", SqlDbType.BigInt) };
para[0].Value = conent;
para[1].Value = id;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 更改组长后更新奖金
/// </summary>
public int Updatemoney3(string Where)
{
String sql = "update [user_Results] set b10=(b0+b1+b2+b3+b4+b5+b6+b7+b8+b9)*0.05,Totalmoney=(b0+b1+b2+b3+b4+b5+b6+b7+b8+b9)-(b0+b1+b2+b3+b4+b5+b6+b7+b8+b9)*0.05 where " + Where;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql);
}
/// <summary>
/// 更新MemberId
/// </summary>
public int UpdateUserId(int UserId, Int64 ID)
{
String sql = "update [user_Results] set UserId=@UserId where ID=@ID";
SqlParameter[] para = { new SqlParameter("@UserId", SqlDbType.Int),
new SqlParameter("@ID", SqlDbType.BigInt) };
para[0].Value = UserId;
para[1].Value = ID;
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
}
/// <summary>
/// 更新预提交时间
/// </summary>
public int Updateaddtime(DateTime addtime, Int64 YRId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("addtime=@addtime");
strSql.Append(" Where Id=@YRId");
SqlParameter[] parameters = {
new SqlParameter("@addtime", SqlDbType.DateTime),
new SqlParameter("@YRId", SqlDbType.BigInt)};
parameters[0].Value = addtime;
parameters[1].Value = YRId;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新成交时间
/// </summary>
public int Updatejdtime(int Seef, DateTime jdtime, DateTime yytime, int UserId, string strRId, Int64 YRId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("Seef=@Seef,jdtime=@jdtime,yytime=@yytime,UserId=@UserId,ListNumber=@RId");
strSql.Append(" Where Id=@YRId");
SqlParameter[] parameters = {
new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@jdtime", SqlDbType.DateTime),
new SqlParameter("@yytime", SqlDbType.DateTime),
new SqlParameter("@UserId", SqlDbType.Int),
new SqlParameter("@RId", SqlDbType.VarChar,50),
new SqlParameter("@YRId", SqlDbType.BigInt)};
parameters[0].Value = Seef;
parameters[1].Value = jdtime;
parameters[2].Value = yytime;
parameters[3].Value = UserId;
parameters[4].Value = strRId;
parameters[5].Value = YRId;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新成交时间
/// </summary>
public int Updatejdtime(DateTime jdtime, Int64 YRId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("jdtime=@jdtime");
strSql.Append(" Where Id=@YRId");
SqlParameter[] parameters = {
new SqlParameter("@jdtime", SqlDbType.DateTime),
new SqlParameter("@YRId", SqlDbType.BigInt)};
parameters[0].Value = jdtime;
parameters[1].Value = YRId;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新支付时间
/// </summary>
public int Updatepaytime(DateTime paytime, Int64 YRId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("paytime=@paytime");
strSql.Append(" Where Id=@YRId");
SqlParameter[] parameters = {
new SqlParameter("@paytime", SqlDbType.DateTime),
new SqlParameter("@YRId", SqlDbType.BigInt)};
parameters[0].Value = paytime;
parameters[1].Value = YRId;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新支付时间
/// </summary>
public int Updatepaytime(int Seef, DateTime paytime, string pic, Int64 YRId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("Seef=@Seef,paytime=@paytime,Managers=@pic");
strSql.Append(" Where Id=@YRId");
SqlParameter[] parameters = {
new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@paytime", SqlDbType.DateTime),
new SqlParameter("@pic", SqlDbType.VarChar,250),
new SqlParameter("@YRId", SqlDbType.BigInt)};
parameters[0].Value = Seef;
parameters[1].Value = paytime;
parameters[2].Value = pic;
parameters[3].Value = YRId;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新结算时间
/// </summary>
public int Updatejstime(DateTime jstime, Int64 YRId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("jstime=@jstime");
strSql.Append(" Where Id=@YRId");
SqlParameter[] parameters = {
new SqlParameter("@jstime", SqlDbType.DateTime),
new SqlParameter("@YRId", SqlDbType.BigInt)};
parameters[0].Value = jstime;
parameters[1].Value = YRId;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新预约时间
/// </summary>
public int Updateyytime(DateTime yytime, Int64 YRId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("yytime=@yytime");
strSql.Append(" Where Id=@YRId");
SqlParameter[] parameters = {
new SqlParameter("@yytime", SqlDbType.DateTime),
new SqlParameter("@YRId", SqlDbType.BigInt)};
parameters[0].Value = yytime;
parameters[1].Value = YRId;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新转售或提货时间
/// </summary>
public int Updatezstime(DateTime zstime, Int64 YRId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("zstime=@zstime");
strSql.Append(" Where Id=@YRId");
SqlParameter[] parameters = {
new SqlParameter("@zstime", SqlDbType.DateTime),
new SqlParameter("@YRId", SqlDbType.BigInt)};
parameters[0].Value = zstime;
parameters[1].Value = YRId;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新完成时间
/// </summary>
public int Updateseeftime(int Seef, DateTime seeftime, Int64 YRId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("Seef=@Seef,seeftime=@seeftime");
strSql.Append(" Where Id=@YRId");
SqlParameter[] parameters = {
new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@seeftime", SqlDbType.DateTime),
new SqlParameter("@YRId", SqlDbType.BigInt)};
parameters[0].Value = Seef;
parameters[1].Value = seeftime;
parameters[2].Value = YRId;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新匹配ID
/// </summary>
public int Update(int Seef, DateTime seeftime, string RId, int UserId, Int64 YRId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("Seef=@Seef,seeftime=@seeftime,ListNumber=@RId,UserId=@UserId");
strSql.Append(" Where Id=@YRId");
SqlParameter[] parameters = {
new SqlParameter("@Seef", SqlDbType.Int),
new SqlParameter("@seeftime", SqlDbType.DateTime),
new SqlParameter("@RId", SqlDbType.VarChar,50),
new SqlParameter("@UserId", SqlDbType.Int),
new SqlParameter("@YRId", SqlDbType.BigInt)};
parameters[0].Value = Seef;
parameters[1].Value = seeftime;
parameters[2].Value = RId;
parameters[3].Value = UserId;
parameters[4].Value = YRId;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 更新匹配ID
/// </summary>
public int Update(Double b0, Double b2, Int64 YRId)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("Update user_Results Set ");
strSql.Append("b0=b0+@b0,b2=b2+@b2");
strSql.Append(" Where Id=@YRId");
SqlParameter[] parameters = {
new SqlParameter("@b0", SqlDbType.Money),
new SqlParameter("@b2", SqlDbType.Money),
new SqlParameter("@YRId", SqlDbType.BigInt)};
parameters[0].Value = b0;
parameters[1].Value = b2;
parameters[2].Value = YRId;
object obj = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (obj == null)
{
return 0;
}
else
{
return Convert.ToInt32(obj);
}
}
/// <summary>
/// 删除一条数据
/// </summary>
public bool Delete(Int64 Id)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("delete from user_Results ");
strSql.Append(" where Id=@Id");
SqlParameter[] parameters = {
new SqlParameter("@Id", SqlDbType.BigInt)
};
parameters[0].Value = Id;
int rows = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString(), parameters);
if (rows > 0)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// 删除一条数据
/// </summary>
public bool DeleteSQL(string SQL)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("delete from user_Results ");
strSql.Append(" where " + SQL);
int rows = Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(strSql.ToString());
if (rows > 0)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public Mtxfw.Model.user_Results GetModel(Int64 Id)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select top 1 * from user_Results");
strSql.Append(" where Id=@Id");
SqlParameter[] parameters = {
new SqlParameter("@Id", SqlDbType.BigInt)
};
parameters[0].Value = Id;
Mtxfw.Model.user_Results model = new Mtxfw.Model.user_Results();
DataSet ds = Mtxfw.Utility.SqlDbHelper_U.GetDataSet(strSql.ToString(), parameters);
if (ds.Tables[0].Rows.Count > 0)
{
if (ds.Tables[0].Rows[0]["Id"].ToString() != "")
{
model.Id = Int64.Parse(ds.Tables[0].Rows[0]["Id"].ToString());
}
if (ds.Tables[0].Rows[0]["MemberId"].ToString() != "")
{
model.MemberId = int.Parse(ds.Tables[0].Rows[0]["MemberId"].ToString());
}
if (ds.Tables[0].Rows[0]["b0"].ToString() != "")
{
model.b0 = Double.Parse(ds.Tables[0].Rows[0]["b0"].ToString());
}
if (ds.Tables[0].Rows[0]["b1"].ToString() != "")
{
model.b1 = Double.Parse(ds.Tables[0].Rows[0]["b1"].ToString());
}
if (ds.Tables[0].Rows[0]["b2"].ToString() != "")
{
model.b2 = Double.Parse(ds.Tables[0].Rows[0]["b2"].ToString());
}
if (ds.Tables[0].Rows[0]["b3"].ToString() != "")
{
model.b3 = Double.Parse(ds.Tables[0].Rows[0]["b3"].ToString());
}
if (ds.Tables[0].Rows[0]["b4"].ToString() != "")
{
model.b4 = Double.Parse(ds.Tables[0].Rows[0]["b4"].ToString());
}
if (ds.Tables[0].Rows[0]["b5"].ToString() != "")
{
model.b5 = Double.Parse(ds.Tables[0].Rows[0]["b5"].ToString());
}
if (ds.Tables[0].Rows[0]["b6"].ToString() != "")
{
model.b6 = Double.Parse(ds.Tables[0].Rows[0]["b6"].ToString());
}
if (ds.Tables[0].Rows[0]["b7"].ToString() != "")
{
model.b7 = Double.Parse(ds.Tables[0].Rows[0]["b7"].ToString());
}
if (ds.Tables[0].Rows[0]["b8"].ToString() != "")
{
model.b8 = Double.Parse(ds.Tables[0].Rows[0]["b8"].ToString());
}
if (ds.Tables[0].Rows[0]["b9"].ToString() != "")
{
model.b9 = Double.Parse(ds.Tables[0].Rows[0]["b9"].ToString());
}
if (ds.Tables[0].Rows[0]["b10"].ToString() != "")
{
model.b10 = Double.Parse(ds.Tables[0].Rows[0]["b10"].ToString());
}
if (ds.Tables[0].Rows[0]["b11"].ToString() != "")
{
model.b11 = Double.Parse(ds.Tables[0].Rows[0]["b11"].ToString());
}
if (ds.Tables[0].Rows[0]["b12"].ToString() != "")
{
model.b12 = Double.Parse(ds.Tables[0].Rows[0]["b12"].ToString());
}
if (ds.Tables[0].Rows[0]["b13"].ToString() != "")
{
model.b13 = Double.Parse(ds.Tables[0].Rows[0]["b13"].ToString());
}
if (ds.Tables[0].Rows[0]["b14"].ToString() != "")
{
model.b14 = Double.Parse(ds.Tables[0].Rows[0]["b14"].ToString());
}
if (ds.Tables[0].Rows[0]["b15"].ToString() != "")
{
model.b15 = Double.Parse(ds.Tables[0].Rows[0]["b15"].ToString());
}
if (ds.Tables[0].Rows[0]["b16"].ToString() != "")
{
model.b16 = Double.Parse(ds.Tables[0].Rows[0]["b16"].ToString());
}
if (ds.Tables[0].Rows[0]["b17"].ToString() != "")
{
model.b17 = Double.Parse(ds.Tables[0].Rows[0]["b17"].ToString());
}
if (ds.Tables[0].Rows[0]["b18"].ToString() != "")
{
model.b18 = Double.Parse(ds.Tables[0].Rows[0]["b18"].ToString());
}
if (ds.Tables[0].Rows[0]["Totalmoney"].ToString() != "")
{
model.Totalmoney = Double.Parse(ds.Tables[0].Rows[0]["Totalmoney"].ToString());
}
model.conent = ds.Tables[0].Rows[0]["conent"].ToString();
model.hasRead = int.Parse(ds.Tables[0].Rows[0]["hasRead"].ToString());
model.Sended = int.Parse(ds.Tables[0].Rows[0]["Sended"].ToString());
model.IFDelete = int.Parse(ds.Tables[0].Rows[0]["IFDelete"].ToString());
if (ds.Tables[0].Rows[0]["Seef"].ToString() != "")
{
model.Seef = int.Parse(ds.Tables[0].Rows[0]["Seef"].ToString());
}
if (ds.Tables[0].Rows[0]["seeftime"].ToString() != "")
{
model.seeftime = DateTime.Parse(ds.Tables[0].Rows[0]["seeftime"].ToString());
}
if (ds.Tables[0].Rows[0]["IFHidden"].ToString() != "")
{
model.IFHidden = int.Parse(ds.Tables[0].Rows[0]["IFHidden"].ToString());
}
if (ds.Tables[0].Rows[0]["UserId"].ToString() != "")
{
model.UserId = int.Parse(ds.Tables[0].Rows[0]["UserId"].ToString());
}
if (ds.Tables[0].Rows[0]["addtime"].ToString() != "")
{
model.addtime = DateTime.Parse(ds.Tables[0].Rows[0]["addtime"].ToString());
}
if (ds.Tables[0].Rows[0]["jdtime"].ToString() != "")
{
model.jdtime = DateTime.Parse(ds.Tables[0].Rows[0]["jdtime"].ToString());
}
if (ds.Tables[0].Rows[0]["paytime"].ToString() != "")
{
model.paytime = DateTime.Parse(ds.Tables[0].Rows[0]["paytime"].ToString());
}
if (ds.Tables[0].Rows[0]["jstime"].ToString() != "")
{
model.jstime = DateTime.Parse(ds.Tables[0].Rows[0]["jstime"].ToString());
}
if (ds.Tables[0].Rows[0]["yytime"].ToString() != "")
{
model.yytime = DateTime.Parse(ds.Tables[0].Rows[0]["yytime"].ToString());
}
if (ds.Tables[0].Rows[0]["zstime"].ToString() != "")
{
model.zstime = DateTime.Parse(ds.Tables[0].Rows[0]["zstime"].ToString());
}
model.ListNumber = ds.Tables[0].Rows[0]["ListNumber"].ToString();
model.Managers = ds.Tables[0].Rows[0]["Managers"].ToString();
model.OrderIds = ds.Tables[0].Rows[0]["OrderIds"].ToString();
model.LDR = ds.Tables[0].Rows[0]["LDR"].ToString();
model.utype = ds.Tables[0].Rows[0]["utype"].ToString();
model.gtype = int.Parse(ds.Tables[0].Rows[0]["gtype"].ToString());
return model;
}
else
{
return null;
}
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public Mtxfw.Model.user_Results GetModel(int gtype, int MemberId, int zaid, int aid, string zrwid)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select top 1 * from user_Results");
strSql.Append(" where gtype=@gtype and utype=6 And IFDelete=0 And MemberId=@MemberId And hasRead=@zaid and Sended=@aid and ListNumber=@zrwid");
SqlParameter[] parameters = {
new SqlParameter("@gtype", SqlDbType.Int),
new SqlParameter("@MemberId", SqlDbType.Int),
new SqlParameter("@zaid", SqlDbType.Int),
new SqlParameter("@aid", SqlDbType.Int),
new SqlParameter("@zrwid", SqlDbType.VarChar,50)
};
parameters[0].Value = gtype;
parameters[1].Value = MemberId;
parameters[2].Value = zaid;
parameters[3].Value = aid;
parameters[4].Value = zrwid;
Mtxfw.Model.user_Results model = new Mtxfw.Model.user_Results();
DataSet ds = Mtxfw.Utility.SqlDbHelper_U.GetDataSet(strSql.ToString(), parameters);
if (ds.Tables[0].Rows.Count > 0)
{
if (ds.Tables[0].Rows[0]["Id"].ToString() != "")
{
model.Id = Int64.Parse(ds.Tables[0].Rows[0]["Id"].ToString());
}
if (ds.Tables[0].Rows[0]["MemberId"].ToString() != "")
{
model.MemberId = int.Parse(ds.Tables[0].Rows[0]["MemberId"].ToString());
}
if (ds.Tables[0].Rows[0]["b0"].ToString() != "")
{
model.b0 = Double.Parse(ds.Tables[0].Rows[0]["b0"].ToString());
}
if (ds.Tables[0].Rows[0]["b1"].ToString() != "")
{
model.b1 = Double.Parse(ds.Tables[0].Rows[0]["b1"].ToString());
}
if (ds.Tables[0].Rows[0]["b2"].ToString() != "")
{
model.b2 = Double.Parse(ds.Tables[0].Rows[0]["b2"].ToString());
}
if (ds.Tables[0].Rows[0]["b3"].ToString() != "")
{
model.b3 = Double.Parse(ds.Tables[0].Rows[0]["b3"].ToString());
}
if (ds.Tables[0].Rows[0]["b4"].ToString() != "")
{
model.b4 = Double.Parse(ds.Tables[0].Rows[0]["b4"].ToString());
}
if (ds.Tables[0].Rows[0]["b5"].ToString() != "")
{
model.b5 = Double.Parse(ds.Tables[0].Rows[0]["b5"].ToString());
}
if (ds.Tables[0].Rows[0]["b6"].ToString() != "")
{
model.b6 = Double.Parse(ds.Tables[0].Rows[0]["b6"].ToString());
}
if (ds.Tables[0].Rows[0]["b7"].ToString() != "")
{
model.b7 = Double.Parse(ds.Tables[0].Rows[0]["b7"].ToString());
}
if (ds.Tables[0].Rows[0]["b8"].ToString() != "")
{
model.b8 = Double.Parse(ds.Tables[0].Rows[0]["b8"].ToString());
}
if (ds.Tables[0].Rows[0]["b9"].ToString() != "")
{
model.b9 = Double.Parse(ds.Tables[0].Rows[0]["b9"].ToString());
}
if (ds.Tables[0].Rows[0]["b10"].ToString() != "")
{
model.b10 = Double.Parse(ds.Tables[0].Rows[0]["b10"].ToString());
}
if (ds.Tables[0].Rows[0]["b11"].ToString() != "")
{
model.b11 = Double.Parse(ds.Tables[0].Rows[0]["b11"].ToString());
}
if (ds.Tables[0].Rows[0]["b12"].ToString() != "")
{
model.b12 = Double.Parse(ds.Tables[0].Rows[0]["b12"].ToString());
}
if (ds.Tables[0].Rows[0]["b13"].ToString() != "")
{
model.b13 = Double.Parse(ds.Tables[0].Rows[0]["b13"].ToString());
}
if (ds.Tables[0].Rows[0]["b14"].ToString() != "")
{
model.b14 = Double.Parse(ds.Tables[0].Rows[0]["b14"].ToString());
}
if (ds.Tables[0].Rows[0]["b15"].ToString() != "")
{
model.b15 = Double.Parse(ds.Tables[0].Rows[0]["b15"].ToString());
}
if (ds.Tables[0].Rows[0]["b16"].ToString() != "")
{
model.b16 = Double.Parse(ds.Tables[0].Rows[0]["b16"].ToString());
}
if (ds.Tables[0].Rows[0]["b17"].ToString() != "")
{
model.b17 = Double.Parse(ds.Tables[0].Rows[0]["b17"].ToString());
}
if (ds.Tables[0].Rows[0]["b18"].ToString() != "")
{
model.b18 = Double.Parse(ds.Tables[0].Rows[0]["b18"].ToString());
}
if (ds.Tables[0].Rows[0]["Totalmoney"].ToString() != "")
{
model.Totalmoney = Double.Parse(ds.Tables[0].Rows[0]["Totalmoney"].ToString());
}
model.conent = ds.Tables[0].Rows[0]["conent"].ToString();
model.hasRead = int.Parse(ds.Tables[0].Rows[0]["hasRead"].ToString());
model.Sended = int.Parse(ds.Tables[0].Rows[0]["Sended"].ToString());
model.IFDelete = int.Parse(ds.Tables[0].Rows[0]["IFDelete"].ToString());
if (ds.Tables[0].Rows[0]["Seef"].ToString() != "")
{
model.Seef = int.Parse(ds.Tables[0].Rows[0]["Seef"].ToString());
}
if (ds.Tables[0].Rows[0]["seeftime"].ToString() != "")
{
model.seeftime = DateTime.Parse(ds.Tables[0].Rows[0]["seeftime"].ToString());
}
if (ds.Tables[0].Rows[0]["IFHidden"].ToString() != "")
{
model.IFHidden = int.Parse(ds.Tables[0].Rows[0]["IFHidden"].ToString());
}
if (ds.Tables[0].Rows[0]["UserId"].ToString() != "")
{
model.UserId = int.Parse(ds.Tables[0].Rows[0]["UserId"].ToString());
}
if (ds.Tables[0].Rows[0]["addtime"].ToString() != "")
{
model.addtime = DateTime.Parse(ds.Tables[0].Rows[0]["addtime"].ToString());
}
if (ds.Tables[0].Rows[0]["jdtime"].ToString() != "")
{
model.jdtime = DateTime.Parse(ds.Tables[0].Rows[0]["jdtime"].ToString());
}
if (ds.Tables[0].Rows[0]["paytime"].ToString() != "")
{
model.paytime = DateTime.Parse(ds.Tables[0].Rows[0]["paytime"].ToString());
}
if (ds.Tables[0].Rows[0]["jstime"].ToString() != "")
{
model.jstime = DateTime.Parse(ds.Tables[0].Rows[0]["jstime"].ToString());
}
if (ds.Tables[0].Rows[0]["zstime"].ToString() != "")
{
model.zstime = DateTime.Parse(ds.Tables[0].Rows[0]["zstime"].ToString());
}
model.ListNumber = ds.Tables[0].Rows[0]["ListNumber"].ToString();
model.Managers = ds.Tables[0].Rows[0]["Managers"].ToString();
model.OrderIds = ds.Tables[0].Rows[0]["OrderIds"].ToString();
model.LDR = ds.Tables[0].Rows[0]["LDR"].ToString();
model.utype = ds.Tables[0].Rows[0]["utype"].ToString();
model.gtype = int.Parse(ds.Tables[0].Rows[0]["gtype"].ToString());
return model;
}
else
{
return null;
}
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public Mtxfw.Model.user_Results GetModel1(int utype, string OrderIds)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select top 1 * from user_Results");
strSql.Append(" where utype=@utype And Seef=0 And OrderIds=@OrderIds");
SqlParameter[] parameters = {
new SqlParameter("@utype", SqlDbType.Int),
new SqlParameter("@OrderIds", SqlDbType.VarChar,250)
};
parameters[0].Value = utype;
parameters[1].Value = OrderIds;
Mtxfw.Model.user_Results model = new Mtxfw.Model.user_Results();
DataSet ds = Mtxfw.Utility.SqlDbHelper_U.GetDataSet(strSql.ToString(), parameters);
if (ds.Tables[0].Rows.Count > 0)
{
if (ds.Tables[0].Rows[0]["Id"].ToString() != "")
{
model.Id = Int64.Parse(ds.Tables[0].Rows[0]["Id"].ToString());
}
if (ds.Tables[0].Rows[0]["b0"].ToString() != "")
{
model.b0 = Double.Parse(ds.Tables[0].Rows[0]["b0"].ToString());
}
if (ds.Tables[0].Rows[0]["b1"].ToString() != "")
{
model.b1 = Double.Parse(ds.Tables[0].Rows[0]["b1"].ToString());
}
if (ds.Tables[0].Rows[0]["b2"].ToString() != "")
{
model.b2 = Double.Parse(ds.Tables[0].Rows[0]["b2"].ToString());
}
if (ds.Tables[0].Rows[0]["b3"].ToString() != "")
{
model.b3 = Double.Parse(ds.Tables[0].Rows[0]["b3"].ToString());
}
model.b17 = Double.Parse(ds.Tables[0].Rows[0]["b17"].ToString());
model.b18 = Double.Parse(ds.Tables[0].Rows[0]["b18"].ToString());
if (ds.Tables[0].Rows[0]["Totalmoney"].ToString() != "")
{
model.Totalmoney = Double.Parse(ds.Tables[0].Rows[0]["Totalmoney"].ToString());
}
if (ds.Tables[0].Rows[0]["MemberId"].ToString() != "")
{
model.MemberId = int.Parse(ds.Tables[0].Rows[0]["MemberId"].ToString());
}
if (ds.Tables[0].Rows[0]["jdtime"].ToString() != "")
{
model.jdtime = DateTime.Parse(ds.Tables[0].Rows[0]["jdtime"].ToString());
}
if (ds.Tables[0].Rows[0]["paytime"].ToString() != "")
{
model.paytime = DateTime.Parse(ds.Tables[0].Rows[0]["paytime"].ToString());
}
if (ds.Tables[0].Rows[0]["jstime"].ToString() != "")
{
model.jstime = DateTime.Parse(ds.Tables[0].Rows[0]["jstime"].ToString());
}
if (ds.Tables[0].Rows[0]["zstime"].ToString() != "")
{
model.zstime = DateTime.Parse(ds.Tables[0].Rows[0]["zstime"].ToString());
}
model.ListNumber = ds.Tables[0].Rows[0]["ListNumber"].ToString();
model.conent = ds.Tables[0].Rows[0]["conent"].ToString();
model.Managers = ds.Tables[0].Rows[0]["Managers"].ToString();
model.OrderIds = ds.Tables[0].Rows[0]["OrderIds"].ToString();
model.MemberId = int.Parse(ds.Tables[0].Rows[0]["MemberId"].ToString());
model.UserId = int.Parse(ds.Tables[0].Rows[0]["UserId"].ToString());
model.hasRead = int.Parse(ds.Tables[0].Rows[0]["hasRead"].ToString());
model.Sended = int.Parse(ds.Tables[0].Rows[0]["Sended"].ToString());
model.IFDelete = int.Parse(ds.Tables[0].Rows[0]["IFDelete"].ToString());
model.Seef = int.Parse(ds.Tables[0].Rows[0]["Seef"].ToString());
model.gtype = int.Parse(ds.Tables[0].Rows[0]["gtype"].ToString());
return model;
}
else
{
return null;
}
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public Mtxfw.Model.user_Results GetModel2(int utype, string ListNumber)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select top 1 * from user_Results");
strSql.Append(" where utype=@utype And Seef=0 And ListNumber=@ListNumber");
SqlParameter[] parameters = {
new SqlParameter("@utype", SqlDbType.Int),
new SqlParameter("@ListNumber", SqlDbType.VarChar,250)
};
parameters[0].Value = utype;
parameters[1].Value = ListNumber;
Mtxfw.Model.user_Results model = new Mtxfw.Model.user_Results();
DataSet ds = Mtxfw.Utility.SqlDbHelper_U.GetDataSet(strSql.ToString(), parameters);
if (ds.Tables[0].Rows.Count > 0)
{
if (ds.Tables[0].Rows[0]["Id"].ToString() != "")
{
model.Id = Int64.Parse(ds.Tables[0].Rows[0]["Id"].ToString());
}
if (ds.Tables[0].Rows[0]["b0"].ToString() != "")
{
model.b0 = Double.Parse(ds.Tables[0].Rows[0]["b0"].ToString());
}
if (ds.Tables[0].Rows[0]["b1"].ToString() != "")
{
model.b1 = Double.Parse(ds.Tables[0].Rows[0]["b1"].ToString());
}
if (ds.Tables[0].Rows[0]["b2"].ToString() != "")
{
model.b2 = Double.Parse(ds.Tables[0].Rows[0]["b2"].ToString());
}
if (ds.Tables[0].Rows[0]["b3"].ToString() != "")
{
model.b3 = Double.Parse(ds.Tables[0].Rows[0]["b3"].ToString());
}
model.b17 = Double.Parse(ds.Tables[0].Rows[0]["b17"].ToString());
model.b18 = Double.Parse(ds.Tables[0].Rows[0]["b18"].ToString());
if (ds.Tables[0].Rows[0]["Totalmoney"].ToString() != "")
{
model.Totalmoney = Double.Parse(ds.Tables[0].Rows[0]["Totalmoney"].ToString());
}
if (ds.Tables[0].Rows[0]["MemberId"].ToString() != "")
{
model.MemberId = int.Parse(ds.Tables[0].Rows[0]["MemberId"].ToString());
}
if (ds.Tables[0].Rows[0]["jdtime"].ToString() != "")
{
model.jdtime = DateTime.Parse(ds.Tables[0].Rows[0]["jdtime"].ToString());
}
if (ds.Tables[0].Rows[0]["paytime"].ToString() != "")
{
model.paytime = DateTime.Parse(ds.Tables[0].Rows[0]["paytime"].ToString());
}
if (ds.Tables[0].Rows[0]["jstime"].ToString() != "")
{
model.jstime = DateTime.Parse(ds.Tables[0].Rows[0]["jstime"].ToString());
}
if (ds.Tables[0].Rows[0]["zstime"].ToString() != "")
{
model.zstime = DateTime.Parse(ds.Tables[0].Rows[0]["zstime"].ToString());
}
model.ListNumber = ds.Tables[0].Rows[0]["ListNumber"].ToString();
model.conent = ds.Tables[0].Rows[0]["conent"].ToString();
model.Managers = ds.Tables[0].Rows[0]["Managers"].ToString();
model.OrderIds = ds.Tables[0].Rows[0]["OrderIds"].ToString();
model.MemberId = int.Parse(ds.Tables[0].Rows[0]["MemberId"].ToString());
model.UserId = int.Parse(ds.Tables[0].Rows[0]["UserId"].ToString());
model.hasRead = int.Parse(ds.Tables[0].Rows[0]["hasRead"].ToString());
model.Sended = int.Parse(ds.Tables[0].Rows[0]["Sended"].ToString());
model.IFDelete = int.Parse(ds.Tables[0].Rows[0]["IFDelete"].ToString());
model.Seef = int.Parse(ds.Tables[0].Rows[0]["Seef"].ToString());
model.gtype = int.Parse(ds.Tables[0].Rows[0]["gtype"].ToString());
return model;
}
else
{
return null;
}
}
/// <summary>
/// 获得数据列表
/// </summary>
public DataSet GetList(string strWhere)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select * ");
strSql.Append(" FROM user_Results ");
if (strWhere.Trim() != "")
{
strSql.Append(" where " + strWhere);
}
return Mtxfw.Utility.SqlDbHelper_U.GetDataSet(strSql.ToString());
}
/// <summary>
/// 获得前几行数据
/// </summary>
public DataSet GetList(int Top, string strWhere, string filedOrder)
{
StringBuilder strSql = new StringBuilder();
strSql.Append("select ");
if (Top > 0)
{
strSql.Append(" top " + Top.ToString());
}
strSql.Append(" * ");
strSql.Append(" FROM user_Results ");
if (strWhere.Trim() != "")
{
strSql.Append(" where " + strWhere);
}
strSql.Append(" order by " + filedOrder);
return Mtxfw.Utility.SqlDbHelper_U.GetDataSet(strSql.ToString());
}
/// <summary>
/// 获取合计总数
/// </summary>
public DataSet GetResultsSumList(string where)
{
SqlParameter[] para = { new SqlParameter("@where", SqlDbType.VarChar,2000)};
para[0].Value = where;
return Mtxfw.Utility.SqlDbHelper_U.GetDataSet("GetResultsSumList", para);
}
/// <summary>
/// 获取合计总数
/// </summary>
public DataSet GetResultsSumList(string where1, string where2)
{
SqlParameter[] para = { new SqlParameter("@where1", SqlDbType.VarChar,2000),
new SqlParameter("@where2", SqlDbType.VarChar,2000)};
para[0].Value = where1;
para[1].Value = where2;
return Mtxfw.Utility.SqlDbHelper_U.GetDataSet("GetResultsSumList2", para);
}
/// <summary>
/// 获取合计总数
/// </summary>
public DataSet GetResultsSumList0(string where)
{
SqlParameter[] para = { new SqlParameter("@where", SqlDbType.VarChar, 2000) };
para[0].Value = where;
return Mtxfw.Utility.SqlDbHelper_U.GetDataSet("GetResultsSumList1", para);
}
}
}