代码修改后的版本,全部提交
This commit is contained in:
582
Mtxfw.DAL/user_Results_jl2.cs
Normal file
582
Mtxfw.DAL/user_Results_jl2.cs
Normal file
@@ -0,0 +1,582 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
namespace Mtxfw.DAL
|
||||
{
|
||||
/// <summary>
|
||||
/// 数据访问类:user_Results
|
||||
/// </summary>
|
||||
public partial class user_Results_jl2 : Mtxfw.Utility.Myabstract
|
||||
{
|
||||
public user_Results_jl2()
|
||||
: base("user_Results_jl2")
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// 增加一条数据
|
||||
/// </summary>
|
||||
public Int64 Add(Mtxfw.Model.user_Results_jl2 model)
|
||||
{
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append("insert into user_Results_jl2(");
|
||||
strSql.Append("MemberId,MemberId2,Addmoney,Cutmoney,Totalmoney,BZContent,PayID,OrdersIDs,OrdersID,utype,utype2,addtime,Seef,seeftime,gtype)");
|
||||
strSql.Append(" values (");
|
||||
strSql.Append("@MemberId,@MemberId2,@Addmoney,@Cutmoney,@Totalmoney,@BZContent,@PayID,@OrdersIDs,@OrdersID,@utype,@utype2,@addtime,@Seef,@seeftime,@gtype)");
|
||||
strSql.Append(";select SCOPE_IDENTITY()");
|
||||
SqlParameter[] parameters = {
|
||||
new SqlParameter("@MemberId", SqlDbType.Int),
|
||||
new SqlParameter("@MemberId2", SqlDbType.Int),
|
||||
new SqlParameter("@Addmoney", SqlDbType.Money),
|
||||
new SqlParameter("@Cutmoney", SqlDbType.Decimal),
|
||||
new SqlParameter("@Totalmoney", SqlDbType.Money),
|
||||
new SqlParameter("@BZContent", SqlDbType.VarChar,8000),
|
||||
new SqlParameter("@PayID", SqlDbType.VarChar,200),
|
||||
new SqlParameter("@OrdersIDs", SqlDbType.VarChar,500),
|
||||
new SqlParameter("@OrdersID", SqlDbType.Int),
|
||||
new SqlParameter("@utype", SqlDbType.Int),
|
||||
new SqlParameter("@utype2", SqlDbType.Int),
|
||||
new SqlParameter("@addtime", SqlDbType.DateTime),
|
||||
new SqlParameter("@Seef", SqlDbType.Int),
|
||||
new SqlParameter("@seeftime", SqlDbType.DateTime),
|
||||
new SqlParameter("@gtype", SqlDbType.Int)};
|
||||
parameters[0].Value = model.MemberId;
|
||||
parameters[1].Value = model.MemberId2;
|
||||
parameters[2].Value = model.Addmoney;
|
||||
parameters[3].Value = model.Cutmoney;
|
||||
parameters[4].Value = model.Totalmoney;
|
||||
parameters[5].Value = model.BZContent;
|
||||
parameters[6].Value = model.PayID;
|
||||
parameters[7].Value = model.OrdersIDs;
|
||||
parameters[8].Value = model.OrdersID;
|
||||
parameters[9].Value = model.utype;
|
||||
parameters[10].Value = model.utype2;
|
||||
parameters[11].Value = model.addtime;
|
||||
parameters[12].Value = model.Seef;
|
||||
parameters[13].Value = model.seeftime;
|
||||
parameters[14].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 UpdateSeef(string Sel, int SelValue, string Sel2, DateTime dt, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set " + Sel + "=@SelValue," + Sel2 + "=@dt where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@SelValue", SqlDbType.Int),
|
||||
new SqlParameter("@dt", SqlDbType.DateTime),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt) };
|
||||
para[0].Value = SelValue;
|
||||
para[1].Value = dt;
|
||||
para[2].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新MemberId
|
||||
/// </summary>
|
||||
public int UpdateMemberId(int MemberId, string Where)
|
||||
{
|
||||
String sql = "update [user_Results_jl2] 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>
|
||||
/// 更新utype2
|
||||
/// </summary>
|
||||
public int Updateutype2(int utype2, string Where)
|
||||
{
|
||||
String sql = "update [user_Results_jl2] set utype2=@utype2 where " + Where;
|
||||
SqlParameter[] para = { new SqlParameter("@utype2", SqlDbType.Int) };
|
||||
para[0].Value = utype2;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新是否出局状态
|
||||
/// </summary>
|
||||
public int UpdateMemberId2(int SelValue, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set MemberId2=@SelValue where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@SelValue", SqlDbType.Int),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = SelValue;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新推广员ID
|
||||
/// </summary>
|
||||
public int UpdateTGYID(int TGYID, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set TGYID=@TGYID where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@TGYID", SqlDbType.Int),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = TGYID;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新代理ID
|
||||
/// </summary>
|
||||
public int UpdateDLID(int DLID, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set DLID=@DLID where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@DLID", SqlDbType.Int),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = DLID;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新是否出局状态
|
||||
/// </summary>
|
||||
public int UpdateMemberId20(int SelValue, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set MemberId2=MemberId2+@SelValue where Id=@Id and MemberId2<MaxNumber";
|
||||
SqlParameter[] para = { new SqlParameter("@SelValue", SqlDbType.Int),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = SelValue;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新Number
|
||||
/// </summary>
|
||||
public int UpdateNumber(int MinNumber, int MaxNumber, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set MinNumber=@MinNumber,MaxNumber=@MaxNumber where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@MinNumber", SqlDbType.Int),
|
||||
new SqlParameter("@MaxNumber", SqlDbType.Int),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = MinNumber;
|
||||
para[1].Value = MaxNumber;
|
||||
para[2].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新Number
|
||||
/// </summary>
|
||||
public int UpdateMinNumber(int MinNumber, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set MinNumber=@MinNumber where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@MinNumber", SqlDbType.Int),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = MinNumber;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新Number
|
||||
/// </summary>
|
||||
public int UpdateMaxNumber(int MaxNumber, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set MaxNumber=@MaxNumber where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@MaxNumber", SqlDbType.Int),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = MaxNumber;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新OrdersID
|
||||
/// </summary>
|
||||
public int UpdateOrdersID(int SelValue, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set OrdersID=OrdersID+@SelValue where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@SelValue", SqlDbType.Int),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = SelValue;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新OrdersID
|
||||
/// </summary>
|
||||
public int UpdateOrdersID0(int SelValue, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set OrdersID=@SelValue where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@SelValue", SqlDbType.Int),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = SelValue;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新激活状态
|
||||
/// </summary>
|
||||
public int UpdateSeef(int SelValue, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set seef=@SelValue where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@SelValue", SqlDbType.Int),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = SelValue;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新激活时间
|
||||
/// </summary>
|
||||
public int UpdateSeef(DateTime dt, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set seeftime=@dt where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@dt", SqlDbType.DateTime),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = dt;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新开始时间和更新时间
|
||||
/// </summary>
|
||||
public int Updatestarttimeandupdatetime(DateTime starttime, DateTime updatetime, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set starttime=@starttime,updatetime=@updatetime where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@starttime", SqlDbType.DateTime),
|
||||
new SqlParameter("@updatetime", SqlDbType.DateTime),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = starttime;
|
||||
para[1].Value = updatetime;
|
||||
para[2].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新更新时间
|
||||
/// </summary>
|
||||
public int Updateupdatetime(DateTime updatetime, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set updatetime=@updatetime where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@updatetime", SqlDbType.DateTime),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = updatetime;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新激活状态
|
||||
/// </summary>
|
||||
public int UpdateSel(string Sel, int SelValue, string Sel2, DateTime dt, string where)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set " + Sel + "=@SelValue," + Sel2 + "=@dt where " + where;
|
||||
SqlParameter[] para = { new SqlParameter("@SelValue", SqlDbType.Int),
|
||||
new SqlParameter("@dt", SqlDbType.DateTime)};
|
||||
para[0].Value = SelValue;
|
||||
para[1].Value = dt;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新Totalmoney0
|
||||
/// </summary>
|
||||
public int UpdateTotalmoney0(Decimal xjg, string where)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set Totalmoney0=Addmoney*@xjg where " + where;
|
||||
SqlParameter[] para = { new SqlParameter("@xjg", SqlDbType.Int)};
|
||||
para[0].Value = xjg;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 批量假删除
|
||||
/// </summary>
|
||||
public int UpdateSel(string Sel, int SelValue, string Sel2, DateTime dt, Int32 OId)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set " + Sel + "=@SelValue," + Sel2 + "=@dt where OrdersID=@OId";
|
||||
SqlParameter[] para = { new SqlParameter("@SelValue", SqlDbType.Int),
|
||||
new SqlParameter("@dt", SqlDbType.DateTime),
|
||||
new SqlParameter("@OId", SqlDbType.Int) };
|
||||
para[0].Value = SelValue;
|
||||
para[1].Value = dt;
|
||||
para[2].Value = OId;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新余额
|
||||
/// </summary>
|
||||
public int Updatemoney(string Sel,Double Addmoney, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set " + Sel + "=" + Sel + "+@Addmoney where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@Addmoney", SqlDbType.Money),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt) };
|
||||
para[0].Value = Addmoney;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新余额
|
||||
/// </summary>
|
||||
public int UpdateCutmoney(Double Cutmoney, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set Cutmoney=@Cutmoney where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@Cutmoney", SqlDbType.Money),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt) };
|
||||
para[0].Value = Cutmoney;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 更新余额
|
||||
/// </summary>
|
||||
public int UpdateTotalmoney(Double Totalmoney, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set Totalmoney=@Totalmoney where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@Totalmoney", SqlDbType.Money),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt) };
|
||||
para[0].Value = Totalmoney;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int UpdateBZContent(string BZContent, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set BZContent=@BZContent where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@BZContent", SqlDbType.VarChar,200),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = BZContent;
|
||||
para[1].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int UpdateOrdersIDsandBZContent(string OrdersIDs,string BZContent, Int64 Id)
|
||||
{
|
||||
String sql = "update user_Results_jl2 set OrdersIDs=@OrdersIDs,BZContent=@BZContent where Id=@Id";
|
||||
SqlParameter[] para = { new SqlParameter("@OrdersIDs", SqlDbType.VarChar,200),
|
||||
new SqlParameter("@BZContent", SqlDbType.VarChar,200),
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)};
|
||||
para[0].Value = OrdersIDs;
|
||||
para[1].Value = BZContent;
|
||||
para[2].Value = Id;
|
||||
return Mtxfw.Utility.SqlDbHelper_U.ExecuteCmd(sql, para);
|
||||
}
|
||||
/// <summary>
|
||||
/// 删除一条数据
|
||||
/// </summary>
|
||||
public bool Delete(Int64 Id)
|
||||
{
|
||||
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append("delete from user_Results_jl2");
|
||||
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 Mtxfw.Model.user_Results_jl2 GetModel(Int64 Id)
|
||||
{
|
||||
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append("select top 1 * from user_Results_jl2");
|
||||
strSql.Append(" where Id=@Id");
|
||||
SqlParameter[] parameters = {
|
||||
new SqlParameter("@Id", SqlDbType.BigInt)
|
||||
};
|
||||
parameters[0].Value = Id;
|
||||
|
||||
Mtxfw.Model.user_Results_jl2 model = new Mtxfw.Model.user_Results_jl2();
|
||||
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 = int.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]["MemberId2"].ToString() != "")
|
||||
{
|
||||
model.MemberId2 = int.Parse(ds.Tables[0].Rows[0]["MemberId2"].ToString());
|
||||
}
|
||||
if (ds.Tables[0].Rows[0]["Addmoney"].ToString() != "")
|
||||
{
|
||||
model.Addmoney = Convert.ToDouble(ds.Tables[0].Rows[0]["Addmoney"].ToString());
|
||||
}
|
||||
if (ds.Tables[0].Rows[0]["Cutmoney"].ToString() != "")
|
||||
{
|
||||
model.Cutmoney = Convert.ToDouble(ds.Tables[0].Rows[0]["Cutmoney"].ToString());
|
||||
}
|
||||
if (ds.Tables[0].Rows[0]["Totalmoney"].ToString() != "")
|
||||
{
|
||||
model.Totalmoney = Convert.ToDouble(ds.Tables[0].Rows[0]["Totalmoney"].ToString());
|
||||
}
|
||||
if (ds.Tables[0].Rows[0]["Totalmoney0"].ToString() != "")
|
||||
{
|
||||
model.Totalmoney0 = Convert.ToDouble(ds.Tables[0].Rows[0]["Totalmoney0"].ToString());
|
||||
}
|
||||
model.BZContent = ds.Tables[0].Rows[0]["BZContent"].ToString();
|
||||
model.PayID = ds.Tables[0].Rows[0]["PayID"].ToString();
|
||||
model.OrdersIDs = ds.Tables[0].Rows[0]["OrdersIDs"].ToString();
|
||||
model.OrdersID = int.Parse(ds.Tables[0].Rows[0]["OrdersID"].ToString());
|
||||
model.utype = int.Parse(ds.Tables[0].Rows[0]["utype"].ToString());
|
||||
model.utype2 = int.Parse(ds.Tables[0].Rows[0]["utype2"].ToString());
|
||||
model.MinNumber = int.Parse(ds.Tables[0].Rows[0]["MinNumber"].ToString());
|
||||
model.MaxNumber = int.Parse(ds.Tables[0].Rows[0]["MaxNumber"].ToString());
|
||||
model.TGYID = int.Parse(ds.Tables[0].Rows[0]["TGYID"].ToString());
|
||||
model.DLID = int.Parse(ds.Tables[0].Rows[0]["DLID"].ToString());
|
||||
if (ds.Tables[0].Rows[0]["addtime"].ToString() != "")
|
||||
{
|
||||
model.addtime = DateTime.Parse(ds.Tables[0].Rows[0]["addtime"].ToString());
|
||||
}
|
||||
model.updatetime = DateTime.Parse(ds.Tables[0].Rows[0]["updatetime"].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());
|
||||
}
|
||||
model.IFDelete = int.Parse(ds.Tables[0].Rows[0]["IFDelete"].ToString());
|
||||
if (ds.Tables[0].Rows[0]["IFDeleteTime"].ToString() != "")
|
||||
{
|
||||
model.IFDeleteTime = DateTime.Parse(ds.Tables[0].Rows[0]["IFDeleteTime"].ToString());
|
||||
}
|
||||
model.gtype = int.Parse(ds.Tables[0].Rows[0]["gtype"].ToString());
|
||||
return model;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 得到一个对象实体
|
||||
/// </summary>
|
||||
public Mtxfw.Model.user_Results_jl2 GetModel(string PayID)
|
||||
{
|
||||
|
||||
StringBuilder strSql = new StringBuilder();
|
||||
strSql.Append("select top 1 * from user_Results_jl2");
|
||||
strSql.Append(" where PayID=@PayID");
|
||||
SqlParameter[] parameters = {
|
||||
new SqlParameter("@PayID", SqlDbType.VarChar,200)
|
||||
};
|
||||
parameters[0].Value = PayID;
|
||||
|
||||
Mtxfw.Model.user_Results_jl2 model = new Mtxfw.Model.user_Results_jl2();
|
||||
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 = int.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]["MemberId2"].ToString() != "")
|
||||
{
|
||||
model.MemberId2 = int.Parse(ds.Tables[0].Rows[0]["MemberId2"].ToString());
|
||||
}
|
||||
if (ds.Tables[0].Rows[0]["Addmoney"].ToString() != "")
|
||||
{
|
||||
model.Addmoney = Convert.ToDouble(ds.Tables[0].Rows[0]["Addmoney"].ToString());
|
||||
}
|
||||
if (ds.Tables[0].Rows[0]["Cutmoney"].ToString() != "")
|
||||
{
|
||||
model.Cutmoney = Convert.ToDouble(ds.Tables[0].Rows[0]["Cutmoney"].ToString());
|
||||
}
|
||||
if (ds.Tables[0].Rows[0]["Totalmoney"].ToString() != "")
|
||||
{
|
||||
model.Totalmoney = Convert.ToDouble(ds.Tables[0].Rows[0]["Totalmoney"].ToString());
|
||||
}
|
||||
if (ds.Tables[0].Rows[0]["Totalmoney0"].ToString() != "")
|
||||
{
|
||||
model.Totalmoney0 = Convert.ToDouble(ds.Tables[0].Rows[0]["Totalmoney0"].ToString());
|
||||
}
|
||||
model.BZContent = ds.Tables[0].Rows[0]["BZContent"].ToString();
|
||||
model.PayID = ds.Tables[0].Rows[0]["PayID"].ToString();
|
||||
model.OrdersIDs = ds.Tables[0].Rows[0]["OrdersIDs"].ToString();
|
||||
model.OrdersID = int.Parse(ds.Tables[0].Rows[0]["OrdersID"].ToString());
|
||||
model.utype = int.Parse(ds.Tables[0].Rows[0]["utype"].ToString());
|
||||
model.utype2 = int.Parse(ds.Tables[0].Rows[0]["utype2"].ToString());
|
||||
model.MinNumber = int.Parse(ds.Tables[0].Rows[0]["MinNumber"].ToString());
|
||||
model.MaxNumber = int.Parse(ds.Tables[0].Rows[0]["MaxNumber"].ToString());
|
||||
model.TGYID = int.Parse(ds.Tables[0].Rows[0]["TGYID"].ToString());
|
||||
model.DLID = int.Parse(ds.Tables[0].Rows[0]["DLID"].ToString());
|
||||
if (ds.Tables[0].Rows[0]["addtime"].ToString() != "")
|
||||
{
|
||||
model.addtime = DateTime.Parse(ds.Tables[0].Rows[0]["addtime"].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());
|
||||
}
|
||||
model.IFDelete = int.Parse(ds.Tables[0].Rows[0]["IFDelete"].ToString());
|
||||
if (ds.Tables[0].Rows[0]["IFDeleteTime"].ToString() != "")
|
||||
{
|
||||
model.IFDeleteTime = DateTime.Parse(ds.Tables[0].Rows[0]["IFDeleteTime"].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_jl2 ");
|
||||
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_jl2 ");
|
||||
if (strWhere.Trim() != "")
|
||||
{
|
||||
strSql.Append(" where " + strWhere);
|
||||
}
|
||||
strSql.Append(" order by " + filedOrder);
|
||||
return Mtxfw.Utility.SqlDbHelper_U.GetDataSet(strSql.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user