2026-03-09 00:13:46 +08:00
using System ;
using System.Data ;
using System.Text ;
using System.Data.SqlClient ;
namespace Mtxfw.DAL
{
/// <summary>
/// 数据访问类:business_info
/// </summary>
public partial class order_info : Mtxfw . Utility . Myabstract
{
public order_info ( )
: base ( "order_info" )
{ }
/// <summary>
/// 增加一条数据
/// </summary>
public int Add ( Mtxfw . Model . order_info model )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "insert into order_info(" ) ;
strSql . Append ( "pid,poid,pcount,ypcount,addressid,orderid,selcolor,guige,Contactname,Contacttel,Province,City,County,IFFill,Tradingarea,Address,Zipcode,Guests,Totalprice,JFTotalprice,Totalprice0,Totalprice1,Totalprice2,Totalprice3,Totalprice4,Totalprice5,Totalprice6,Totalprice7,Totalprice8,Totalprice9,Totalprice10,Totalnum,O_Submit,O_yhj,UserID,MemberId,ZTMemberId,utype,ttype,ttype0,ptype,ptgroup,ifxnhy,ypznum,ifxhpt,peitype,gtype)" ) ;
strSql . Append ( " values (" ) ;
strSql . Append ( "@pid,@poid,@pcount,@ypcount,@addressid,@orderid,@selcolor,@guige,@Contactname,@Contacttel,@Province,@City,@County,@IFFill,@Tradingarea,@Address,@Zipcode,@Guests,@Totalprice,@JFTotalprice,@Totalprice0,@Totalprice1,@Totalprice2,@Totalprice3,@Totalprice4,@Totalprice5,@Totalprice6,@Totalprice7,@Totalprice8,@Totalprice9,@Totalprice10,@Totalnum,@O_Submit,@O_yhj,@UserID,@MemberId,@ZTMemberId,@utype,@ttype,@ttype0,@ptype,@ptgroup,@ifxnhy,@ypznum,@ifxhpt,@peitype,@gtype)" ) ;
strSql . Append ( ";select SCOPE_IDENTITY()" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@pid" , SqlDbType . Int ) ,
new SqlParameter ( "@poid" , SqlDbType . Int ) ,
new SqlParameter ( "@pcount" , SqlDbType . Int ) ,
new SqlParameter ( "@ypcount" , SqlDbType . Int ) ,
new SqlParameter ( "@addressid" , SqlDbType . Int ) ,
new SqlParameter ( "@orderid" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@selcolor" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@guige" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@Contactname" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@Contacttel" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@Province" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@City" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@County" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@IFFill" , SqlDbType . Int ) ,
new SqlParameter ( "@Tradingarea" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@Address" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@Zipcode" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@Guests" , SqlDbType . VarChar , 8000 ) ,
new SqlParameter ( "@Totalprice" , SqlDbType . Money ) ,
new SqlParameter ( "@JFTotalprice" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalprice0" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalprice1" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalprice2" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalprice3" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalprice4" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalprice5" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalprice6" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalprice7" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalprice8" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalprice9" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalprice10" , SqlDbType . Money ) ,
new SqlParameter ( "@Totalnum" , SqlDbType . Int ) ,
new SqlParameter ( "@O_Submit" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@O_yhj" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@UserID" , SqlDbType . Int ) ,
new SqlParameter ( "@MemberId" , SqlDbType . Int ) ,
new SqlParameter ( "@ZTMemberId" , SqlDbType . Int ) ,
new SqlParameter ( "@utype" , SqlDbType . VarChar , 20 ) ,
new SqlParameter ( "@ttype" , SqlDbType . Int ) ,
new SqlParameter ( "@ttype0" , SqlDbType . Int ) ,
new SqlParameter ( "@ptype" , SqlDbType . Int ) ,
new SqlParameter ( "@ptgroup" , SqlDbType . Int ) ,
new SqlParameter ( "@ifxnhy" , SqlDbType . Int ) ,
new SqlParameter ( "@ypznum" , SqlDbType . Int ) ,
new SqlParameter ( "@ifxhpt" , SqlDbType . Int ) ,
new SqlParameter ( "@peitype" , SqlDbType . Int ) ,
new SqlParameter ( "@gtype" , SqlDbType . Int ) } ;
parameters [ 0 ] . Value = model . pid ;
parameters [ 1 ] . Value = model . poid ;
parameters [ 2 ] . Value = model . pcount ;
parameters [ 3 ] . Value = model . ypcount ;
parameters [ 4 ] . Value = model . addressid ;
parameters [ 5 ] . Value = model . orderid ;
parameters [ 6 ] . Value = model . selcolor ;
parameters [ 7 ] . Value = model . guige ;
parameters [ 8 ] . Value = model . Contactname ;
parameters [ 9 ] . Value = model . Contacttel ;
parameters [ 10 ] . Value = model . Province ;
parameters [ 11 ] . Value = model . City ;
parameters [ 12 ] . Value = model . County ;
parameters [ 13 ] . Value = model . IFFill ;
parameters [ 14 ] . Value = model . Tradingarea ;
parameters [ 15 ] . Value = model . Address ;
parameters [ 16 ] . Value = model . Zipcode ;
parameters [ 17 ] . Value = model . Guests ;
parameters [ 18 ] . Value = model . Totalprice ;
parameters [ 19 ] . Value = model . JFTotalprice ;
parameters [ 20 ] . Value = model . Totalprice0 ;
parameters [ 21 ] . Value = model . Totalprice1 ;
parameters [ 22 ] . Value = model . Totalprice2 ;
parameters [ 23 ] . Value = model . Totalprice3 ;
parameters [ 24 ] . Value = model . Totalprice4 ;
parameters [ 25 ] . Value = model . Totalprice5 ;
parameters [ 26 ] . Value = model . Totalprice6 ;
parameters [ 27 ] . Value = model . Totalprice7 ;
parameters [ 28 ] . Value = model . Totalprice8 ;
parameters [ 29 ] . Value = model . Totalprice9 ;
parameters [ 30 ] . Value = model . Totalprice10 ;
parameters [ 31 ] . Value = model . Totalnum ;
parameters [ 32 ] . Value = model . O_Submit ;
parameters [ 33 ] . Value = model . O_yhj ;
parameters [ 34 ] . Value = model . UserID ;
parameters [ 35 ] . Value = model . MemberId ;
parameters [ 36 ] . Value = model . ZTMemberId ;
parameters [ 37 ] . Value = model . utype ;
parameters [ 38 ] . Value = model . ttype ;
parameters [ 39 ] . Value = model . ttype0 ;
parameters [ 40 ] . Value = model . ptype ;
parameters [ 41 ] . Value = model . ptgroup ;
parameters [ 42 ] . Value = model . ifxnhy ;
parameters [ 43 ] . Value = model . ypznum ;
parameters [ 44 ] . Value = model . ifxhpt ;
parameters [ 45 ] . Value = model . peitype ;
parameters [ 46 ] . Value = model . gtype ;
object obj = Mtxfw . Utility . SqlDbHelper_U . GetObject ( strSql . ToString ( ) , parameters ) ;
if ( obj . ToString ( ) = = "" )
{
return 0 ;
}
else
{
return Convert . ToInt32 ( obj ) ;
}
}
/// <summary>
/// 更新送货信息
/// </summary>
public int Update ( Mtxfw . Model . order_info model )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
strSql . Append ( "Contactname=@Contactname" ) ;
strSql . Append ( ",Contacttel=@Contacttel" ) ;
strSql . Append ( ",Province=@Province" ) ;
strSql . Append ( ",City=@City" ) ;
strSql . Append ( ",County=@County" ) ;
strSql . Append ( ",IFFill=@IFFill" ) ;
strSql . Append ( ",Tradingarea=@Tradingarea" ) ;
strSql . Append ( ",Address=@Address" ) ;
strSql . Append ( ",Zipcode=@Zipcode" ) ;
strSql . Append ( ",Guests=@Guests" ) ;
strSql . Append ( " where Id=@Id" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@Contactname" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@Contacttel" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@Province" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@City" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@County" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@IFFill" , SqlDbType . Int ) ,
new SqlParameter ( "@Tradingarea" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@Address" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@Zipcode" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@Guests" , SqlDbType . VarChar , 8000 ) ,
new SqlParameter ( "@Id" , SqlDbType . Int , 4 ) } ;
parameters [ 0 ] . Value = model . Contactname ;
parameters [ 1 ] . Value = model . Contacttel ;
parameters [ 2 ] . Value = model . Province ;
parameters [ 3 ] . Value = model . City ;
parameters [ 4 ] . Value = model . County ;
parameters [ 5 ] . Value = model . IFFill ;
parameters [ 6 ] . Value = model . Tradingarea ;
parameters [ 7 ] . Value = model . Address ;
parameters [ 8 ] . Value = model . Zipcode ;
parameters [ 9 ] . Value = model . Guests ;
parameters [ 10 ] . Value = model . Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
/// <summary>
/// 更新配送信息
/// </summary>
public int Updateaddressid ( int addressid , int Id )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
strSql . Append ( "addressid=@addressid" ) ;
strSql . Append ( " where Id=@Id" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@addressid" , SqlDbType . Int ) ,
new SqlParameter ( "@Id" , SqlDbType . Int , 4 ) } ;
parameters [ 0 ] . Value = addressid ;
parameters [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
/// <summary>
/// 更新总价
/// </summary>
public int UpdateTotalprice ( Double Totalprice , int Id )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
strSql . Append ( "Totalprice=@Totalprice" ) ;
strSql . Append ( " where Id=@Id" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@Totalprice" , SqlDbType . Money ) ,
new SqlParameter ( "@Id" , SqlDbType . Int , 4 ) } ;
parameters [ 0 ] . Value = Totalprice ;
parameters [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
/// <summary>
/// 更新Totalprice8
/// </summary>
public int UpdateTotalprice8 ( Double Totalprice , int Id )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
strSql . Append ( "Totalprice8=Totalprice8+@Totalprice" ) ;
strSql . Append ( " where Id=@Id" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@Totalprice" , SqlDbType . Money ) ,
new SqlParameter ( "@Id" , SqlDbType . Int , 4 ) } ;
parameters [ 0 ] . Value = Totalprice ;
parameters [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
/// <summary>
/// 更新Totalprice9
/// </summary>
public int UpdateTotalprice9 ( Double Totalprice , int Id )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
strSql . Append ( "Totalprice9=Totalprice9+@Totalprice" ) ;
strSql . Append ( " where Id=@Id" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@Totalprice" , SqlDbType . Money ) ,
new SqlParameter ( "@Id" , SqlDbType . Int , 4 ) } ;
parameters [ 0 ] . Value = Totalprice ;
parameters [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
/// <summary>
/// 更新Totalprice10
/// </summary>
public int UpdateTotalprice10 ( Double Totalprice , int Id )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
strSql . Append ( "Totalprice10=Totalprice10+@Totalprice" ) ;
strSql . Append ( " where Id=@Id" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@Totalprice" , SqlDbType . Money ) ,
new SqlParameter ( "@Id" , SqlDbType . Int , 4 ) } ;
parameters [ 0 ] . Value = Totalprice ;
parameters [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
/// <summary>
/// 更新状态
/// </summary>
public int UpdateqyState ( int P , string SelValue , DateTime SelValue2 , int Id )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
if ( P = = 0 )
{
strSql . Append ( "O_Payed=@SelValue,O_Payed_Date=@SelValue2" ) ;
}
else if ( P = = 1 )
{
strSql . Append ( "O_Shipped=@SelValue,O_Shipped_Date=@SelValue2" ) ;
}
else if ( P = = 2 )
{
strSql . Append ( "O_received=@SelValue,O_received_Date=@SelValue2" ) ;
}
else if ( P = = 3 )
{
strSql . Append ( "O_Return=@SelValue,O_Return_Date=@SelValue2" ) ;
}
else if ( P = = 4 )
{
strSql . Append ( "O_Returned=@SelValue,O_Returned_Date=@SelValue2" ) ;
}
else if ( P = = 5 )
{
strSql . Append ( "O_recReturn=@SelValue,O_recReturn_Date=@SelValue2" ) ;
}
strSql . Append ( " where Id=@Id" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@SelValue" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@SelValue2" , SqlDbType . DateTime ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
parameters [ 0 ] . Value = SelValue ;
parameters [ 1 ] . Value = SelValue2 ;
parameters [ 2 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
/// <summary>
/// 更新状态
/// </summary>
public int UpdateqyState ( int P , string SelValue , DateTime SelValue2 , string OID )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
if ( P = = 0 )
{
strSql . Append ( "O_Payed=@SelValue,O_Payed_Date=@SelValue2" ) ;
}
else if ( P = = 1 )
{
strSql . Append ( "O_Shipped=@SelValue,O_Shipped_Date=@SelValue2" ) ;
}
else if ( P = = 2 )
{
strSql . Append ( "O_received=@SelValue,O_received_Date=@SelValue2" ) ;
}
else if ( P = = 3 )
{
strSql . Append ( "O_Return=@SelValue,O_Return_Date=@SelValue2" ) ;
}
else if ( P = = 4 )
{
strSql . Append ( "O_Returned=@SelValue,O_Returned_Date=@SelValue2" ) ;
}
else if ( P = = 5 )
{
strSql . Append ( "O_recReturn=@SelValue,O_recReturn_Date=@SelValue2" ) ;
}
strSql . Append ( " where orderid=@OID" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@SelValue" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@SelValue2" , SqlDbType . DateTime ) ,
new SqlParameter ( "@OID" , SqlDbType . VarChar , 50 ) } ;
parameters [ 0 ] . Value = SelValue ;
parameters [ 1 ] . Value = SelValue2 ;
parameters [ 2 ] . Value = OID ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
2026-03-29 01:05:28 +08:00
/// <summary>
/// 核销订单
/// </summary>
public int UpdateHxState ( DateTime SelValue2 , string OID , string hxm )
{
string SelValue = "2" ;
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
strSql . Append ( "O_Payed=@SelValue,O_Payed_Date=@SelValue2" ) ;
strSql . Append ( " where id=@OID and orderhxm =@hxm" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@SelValue" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@SelValue2" , SqlDbType . DateTime ) ,
new SqlParameter ( "@OID" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@hxm" , SqlDbType . VarChar , 50 ) } ;
parameters [ 0 ] . Value = SelValue ;
parameters [ 1 ] . Value = SelValue2 ;
parameters [ 2 ] . Value = OID ;
parameters [ 3 ] . Value = hxm ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
2026-03-09 00:13:46 +08:00
/// <summary>
/// 更新运单号
/// </summary>
public int Updateyundanhao ( string yundanhao , string kdcompay , string wlremarks , Int32 Id )
{
String sql = "update [order_info] set yundanhao=@yundanhao,kdcompay=@kdcompay,wlremarks=@wlremarks where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@yundanhao" , SqlDbType . VarChar , 100 ) ,
new SqlParameter ( "@kdcompay" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@wlremarks" , SqlDbType . VarChar , 8000 ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = yundanhao ;
para [ 1 ] . Value = kdcompay ;
para [ 2 ] . Value = wlremarks ;
para [ 3 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新微信支付订单号和商户订单号
/// </summary>
public int Updatetranid ( string transaction_id , string out_trade_no , Int32 Id )
{
String sql = "update [order_info] set transaction_id=@transaction_id,out_trade_no=@out_trade_no where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@transaction_id" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@out_trade_no" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = transaction_id ;
para [ 1 ] . Value = out_trade_no ;
para [ 2 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新订单号微信退款refund_id
/// </summary>
public int Updaterefund_id ( string refund_id , Int32 Id )
{
String sql = "update [order_info] set refund_id=@refund_id where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@refund_id" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = refund_id ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新退货理由
/// </summary>
public int UpdateReturnReason ( string O_ReturnReason , Int32 Id )
{
String sql = "update [order_info] set O_ReturnReason=@O_ReturnReason where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@O_ReturnReason" , SqlDbType . VarChar , 500 ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = O_ReturnReason ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新订单号微信退款状态
/// </summary>
public int Updaterefundstatus ( int refundstatus , string refund_channel , string user_received_account , string success_time , Int32 Id )
{
String sql = "update [order_info] set refundstatus=@refundstatus,refund_channel=@refund_channel,user_received_account=@user_received_account,success_time=@success_time where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@refundstatus" , SqlDbType . Int ) ,
new SqlParameter ( "@refund_channel" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@user_received_account" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@success_time" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = refundstatus ;
para [ 1 ] . Value = refund_channel ;
para [ 2 ] . Value = user_received_account ;
para [ 3 ] . Value = success_time ;
para [ 4 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新是否已上传发货信息
/// </summary>
public int Updateifxnhy ( int ifxnhy , Int32 Id )
{
String sql = "update [order_info] set ifxnhy=@ifxnhy where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@ifxnhy" , SqlDbType . Int ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = ifxnhy ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新openid
/// </summary>
public int Updateopenid ( string openid , Int32 Id )
{
String sql = "update [order_info] set openid=@openid where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@openid" , SqlDbType . VarChar , 250 ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = openid ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新已阅读
/// </summary>
public int UpdatehasRead ( int hasRead , Int32 Id )
{
String sql = "update [order_info] set hasRead=@hasRead where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@hasRead" , SqlDbType . Int ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = hasRead ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新poid
/// </summary>
public int Updatepoid ( Int32 xaddweek , Int32 yaddweek )
{
String sql = "update [order_info] set poid=@xaddweek where ttype=2 and ptype=1 And IFDelete=0 and poid=@yaddweek and pcount=0 and O_Seef=0" ;
SqlParameter [ ] para = { new SqlParameter ( "@xaddweek" , SqlDbType . Int ) ,
new SqlParameter ( "@yaddweek" , SqlDbType . Int ) } ;
para [ 0 ] . Value = xaddweek ;
para [ 1 ] . Value = yaddweek ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新拼单数量
/// </summary>
public int Updateypcount ( int ypcount , Int32 Id )
{
String sql = "update [order_info] set ypcount=ypcount+@ypcount where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@ypcount" , SqlDbType . Int ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = ypcount ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新是否不中
/// </summary>
public int UpdateIsbuzhong ( int Isbuzhong , Int32 Id )
{
String sql = "update [order_info] set Isbuzhong=@Isbuzhong where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@Isbuzhong" , SqlDbType . Int ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = Isbuzhong ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新拼中订单组数
/// </summary>
public int Updateptgroup ( int ptgroup , Int32 Id )
{
String sql = "update [order_info] set ptgroup=@ptgroup where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@ptgroup" , SqlDbType . Int ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = ptgroup ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新是否拼单或开团中
/// </summary>
public int Updateifpd ( int ifpd , Int32 Id )
{
String sql = "update [order_info] set ifpd=@ifpd where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@ifpd" , SqlDbType . Int ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = ifpd ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新是否包含真实会员拼单
/// </summary>
public int Updateifbhzshy ( int ifbhzshy , Int32 Id )
{
String sql = "update [order_info] set ifbhzshy=@ifbhzshy where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@ifbhzshy" , SqlDbType . Int ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = ifbhzshy ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新int字段
/// </summary>
public int Updatesel ( string sel , int selvalue , Int32 Id )
{
String sql = "update [order_info] set " + sel + "=" + sel + "+@selvalue where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@selvalue" , SqlDbType . Int ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = selvalue ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新int字段
/// </summary>
public int Updatesel0 ( string sel , int selvalue , Int32 Id )
{
String sql = "update [order_info] set " + sel + "=@selvalue where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@selvalue" , SqlDbType . Int ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = selvalue ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新Money字段
/// </summary>
public int Updateselprice ( string sel , Double price , Int32 Id )
{
String sql = "update [order_info] set " + sel + "=" + sel + "+@price where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@price" , SqlDbType . Money ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = price ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新拼单状态
/// </summary>
public int UpdatePayed ( string SelValue , DateTime SelValue2 , int poid )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
strSql . Append ( "O_Payed=@SelValue,O_Payed_Date=@SelValue2" ) ;
strSql . Append ( " where id=@poid or poid=@poid" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@SelValue" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@SelValue2" , SqlDbType . DateTime ) ,
new SqlParameter ( "@poid" , SqlDbType . VarChar , 50 ) } ;
parameters [ 0 ] . Value = SelValue ;
parameters [ 1 ] . Value = SelValue2 ;
parameters [ 2 ] . Value = poid ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
/// <summary>
/// 更新付款时间
/// </summary>
public int UpdatePayedDate ( DateTime SelValue2 , int poid )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
strSql . Append ( "O_Payed_Date=@SelValue2" ) ;
strSql . Append ( " where id=@poid" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@SelValue2" , SqlDbType . DateTime ) ,
new SqlParameter ( "@poid" , SqlDbType . VarChar , 50 ) } ;
parameters [ 0 ] . Value = SelValue2 ;
parameters [ 1 ] . Value = poid ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
/// <summary>
/// 更新会员id
/// </summary>
public int UpdateUserId ( int ptype , int UserId , int id )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "update order_info set " ) ;
strSql . Append ( "ptype=@ptype,UserId=@UserId" ) ;
strSql . Append ( " where id=@id" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@ptype" , SqlDbType . Int ) ,
new SqlParameter ( "@UserId" , SqlDbType . Int ) ,
new SqlParameter ( "@id" , SqlDbType . Int ) } ;
parameters [ 0 ] . Value = ptype ;
parameters [ 1 ] . Value = UserId ;
parameters [ 2 ] . Value = id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) , parameters ) ;
}
/// <summary>
/// 更新自提地址
/// </summary>
public int UpdateAddress0 ( string Address0 , Int32 Id )
{
String sql = "update [order_info] set Address0=@Address0 where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@Address0" , SqlDbType . VarChar , 2000 ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = Address0 ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 更新orderhxm
/// </summary>
public int Updateorderhxm ( string orderhxm , Int32 Id )
{
String sql = "update [order_info] set orderhxm=@orderhxm where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@orderhxm" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = orderhxm ;
para [ 1 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 删除一条数据
/// </summary>
public bool Delete ( int Id )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "delete from order_info " ) ;
strSql . Append ( " where Id=@Id" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@Id" , SqlDbType . Int , 4 )
} ;
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 DeleteList ( string Idlist )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "delete from order_info " ) ;
strSql . Append ( " where Id in (" + Idlist + ") " ) ;
int rows = Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( strSql . ToString ( ) ) ;
if ( rows > 0 )
{
return true ;
}
else
{
return false ;
}
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public Mtxfw . Model . order_info GetModel ( int Id )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "select top 1 * from order_info a" ) ;
strSql . Append ( " where Id=@Id" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@Id" , SqlDbType . Int , 4 )
} ;
parameters [ 0 ] . Value = Id ;
Mtxfw . Model . order_info model = new Mtxfw . Model . order_info ( ) ;
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 ] [ "pid" ] . ToString ( ) ! = "" )
{
model . pid = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "pid" ] . ToString ( ) ) ;
}
model . poid = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "poid" ] . ToString ( ) ) ;
model . pcount = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "pcount" ] . ToString ( ) ) ;
model . ypcount = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ypcount" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "addressid" ] . ToString ( ) ! = "" )
{
model . addressid = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "addressid" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "orderid" ] . ToString ( ) ! = "" )
{
model . orderid = ds . Tables [ 0 ] . Rows [ 0 ] [ "orderid" ] . ToString ( ) ;
}
model . orderhxm = ds . Tables [ 0 ] . Rows [ 0 ] [ "orderhxm" ] . ToString ( ) ;
model . selcolor = ds . Tables [ 0 ] . Rows [ 0 ] [ "selcolor" ] . ToString ( ) ;
model . guige = ds . Tables [ 0 ] . Rows [ 0 ] [ "guige" ] . ToString ( ) ;
model . Contactname = ds . Tables [ 0 ] . Rows [ 0 ] [ "Contactname" ] . ToString ( ) ;
model . Contacttel = ds . Tables [ 0 ] . Rows [ 0 ] [ "Contacttel" ] . ToString ( ) ;
model . Province = ds . Tables [ 0 ] . Rows [ 0 ] [ "Province" ] . ToString ( ) ;
model . City = ds . Tables [ 0 ] . Rows [ 0 ] [ "City" ] . ToString ( ) ;
model . County = ds . Tables [ 0 ] . Rows [ 0 ] [ "County" ] . ToString ( ) ;
model . IFFill = Convert . ToInt32 ( ds . Tables [ 0 ] . Rows [ 0 ] [ "IFFill" ] . ToString ( ) ) ;
model . Tradingarea = ds . Tables [ 0 ] . Rows [ 0 ] [ "Tradingarea" ] . ToString ( ) ;
model . Address = ds . Tables [ 0 ] . Rows [ 0 ] [ "Address" ] . ToString ( ) ;
model . Address0 = ds . Tables [ 0 ] . Rows [ 0 ] [ "Address0" ] . ToString ( ) ;
model . Zipcode = ds . Tables [ 0 ] . Rows [ 0 ] [ "Zipcode" ] . ToString ( ) ;
model . yundanhao = ds . Tables [ 0 ] . Rows [ 0 ] [ "yundanhao" ] . ToString ( ) ;
model . kdcompay = ds . Tables [ 0 ] . Rows [ 0 ] [ "kdcompay" ] . ToString ( ) ;
model . Guests = ds . Tables [ 0 ] . Rows [ 0 ] [ "Guests" ] . ToString ( ) ;
model . wlremarks = ds . Tables [ 0 ] . Rows [ 0 ] [ "wlremarks" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice" ] . ToString ( ) ! = "" )
{
model . Totalprice = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice" ] . ToString ( ) ) ;
}
model . JFTotalprice = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "JFTotalprice" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice0" ] . ToString ( ) ! = "" )
{
model . Totalprice0 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice0" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice1" ] . ToString ( ) ! = "" )
{
model . Totalprice1 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice1" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice2" ] . ToString ( ) ! = "" )
{
model . Totalprice2 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice2" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice3" ] . ToString ( ) ! = "" )
{
model . Totalprice3 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice3" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice4" ] . ToString ( ) ! = "" )
{
model . Totalprice4 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice4" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice5" ] . ToString ( ) ! = "" )
{
model . Totalprice5 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice5" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice6" ] . ToString ( ) ! = "" )
{
model . Totalprice6 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice6" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice7" ] . ToString ( ) ! = "" )
{
model . Totalprice7 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice7" ] . ToString ( ) ) ;
}
model . Totalprice8 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice8" ] . ToString ( ) ) ;
model . Totalprice9 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice9" ] . ToString ( ) ) ;
model . Totalprice10 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice10" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalnum" ] . ToString ( ) ! = "" )
{
model . Totalnum = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalnum" ] . ToString ( ) ) ;
}
model . O_Submit = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Submit" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ! = "" )
{
model . O_SubmitDate = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ) ;
}
model . O_Submit = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Submit" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ! = "" )
{
model . O_SubmitDate = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ) ;
}
model . O_Payed = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Payed" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Payed_Date" ] . ToString ( ) ! = "" )
{
model . O_Payed_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Payed_Date" ] . ToString ( ) ) ;
}
model . O_Shipped = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Shipped" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Shipped_Date" ] . ToString ( ) ! = "" )
{
model . O_Shipped_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Shipped_Date" ] . ToString ( ) ) ;
}
model . O_received = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_received" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_received_Date" ] . ToString ( ) ! = "" )
{
model . O_received_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_received_Date" ] . ToString ( ) ) ;
}
model . O_Return = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Return" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Return_Date" ] . ToString ( ) ! = "" )
{
model . O_Return_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Return_Date" ] . ToString ( ) ) ;
}
model . O_Returned = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Returned" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Returned_Date" ] . ToString ( ) ! = "" )
{
model . O_Returned_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Returned_Date" ] . ToString ( ) ) ;
}
model . O_recReturn = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_recReturn" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_recReturn_Date" ] . ToString ( ) ! = "" )
{
model . O_recReturn_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_recReturn_Date" ] . ToString ( ) ) ;
}
model . O_yhj = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_yhj" ] . ToString ( ) ;
model . O_ReturnReason = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_ReturnReason" ] . ToString ( ) ;
model . utype = ds . Tables [ 0 ] . Rows [ 0 ] [ "utype" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "UserID" ] . ToString ( ) ! = "" )
{
model . UserID = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "UserID" ] . ToString ( ) ) ;
}
else
{
model . UserID = 0 ;
}
model . MemberId = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "MemberId" ] . ToString ( ) ) ;
model . ZTMemberId = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ZTMemberId" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "IFDelete" ] . ToString ( ) ! = "" )
{
model . IFDelete = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "IFDelete" ] . ToString ( ) ) ;
}
model . Isbuzhong = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Isbuzhong" ] . ToString ( ) ) ;
model . hasRead = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "hasRead" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Seef" ] . ToString ( ) ! = "" )
{
model . O_Seef = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Seef" ] . ToString ( ) ) ;
}
model . transaction_id = ds . Tables [ 0 ] . Rows [ 0 ] [ "transaction_id" ] . ToString ( ) ;
model . out_trade_no = ds . Tables [ 0 ] . Rows [ 0 ] [ "out_trade_no" ] . ToString ( ) ;
model . refund_id = ds . Tables [ 0 ] . Rows [ 0 ] [ "refund_id" ] . ToString ( ) ;
model . refundstatus = Convert . ToInt32 ( ds . Tables [ 0 ] . Rows [ 0 ] [ "refundstatus" ] . ToString ( ) ) ;
model . refund_channel = ds . Tables [ 0 ] . Rows [ 0 ] [ "refund_channel" ] . ToString ( ) ;
model . user_received_account = ds . Tables [ 0 ] . Rows [ 0 ] [ "user_received_account" ] . ToString ( ) ;
model . openid = ds . Tables [ 0 ] . Rows [ 0 ] [ "openid" ] . ToString ( ) ;
model . success_time = ds . Tables [ 0 ] . Rows [ 0 ] [ "success_time" ] . ToString ( ) ;
model . utype = ds . Tables [ 0 ] . Rows [ 0 ] [ "utype" ] . ToString ( ) ;
model . ttype = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ttype" ] . ToString ( ) ) ;
model . ttype0 = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ttype0" ] . ToString ( ) ) ;
model . ptype = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ptype" ] . ToString ( ) ) ;
model . ptgroup = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ptgroup" ] . ToString ( ) ) ;
model . ifxnhy = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifxnhy" ] . ToString ( ) ) ;
model . ypznum = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ypznum" ] . ToString ( ) ) ;
model . ifxhpt = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifxhpt" ] . ToString ( ) ) ;
model . ifpd = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifpd" ] . ToString ( ) ) ;
model . ifbhzshy = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifbhzshy" ] . ToString ( ) ) ;
model . peitype = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "peitype" ] . ToString ( ) ) ;
model . gtype = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "gtype" ] . ToString ( ) ) ;
return model ;
}
else
{
return null ;
}
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public Mtxfw . Model . order_info GetModelbyorderhxm ( string orderhxm )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "select top 1 * from order_info a" ) ;
strSql . Append ( " where orderhxm=@orderhxm" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@orderhxm" , SqlDbType . VarChar , 50 )
} ;
parameters [ 0 ] . Value = orderhxm ;
Mtxfw . Model . order_info model = new Mtxfw . Model . order_info ( ) ;
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 ] [ "pid" ] . ToString ( ) ! = "" )
{
model . pid = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "pid" ] . ToString ( ) ) ;
}
model . poid = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "poid" ] . ToString ( ) ) ;
model . pcount = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "pcount" ] . ToString ( ) ) ;
model . ypcount = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ypcount" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "addressid" ] . ToString ( ) ! = "" )
{
model . addressid = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "addressid" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "orderid" ] . ToString ( ) ! = "" )
{
model . orderid = ds . Tables [ 0 ] . Rows [ 0 ] [ "orderid" ] . ToString ( ) ;
}
model . orderhxm = ds . Tables [ 0 ] . Rows [ 0 ] [ "orderhxm" ] . ToString ( ) ;
model . selcolor = ds . Tables [ 0 ] . Rows [ 0 ] [ "selcolor" ] . ToString ( ) ;
model . guige = ds . Tables [ 0 ] . Rows [ 0 ] [ "guige" ] . ToString ( ) ;
model . Contactname = ds . Tables [ 0 ] . Rows [ 0 ] [ "Contactname" ] . ToString ( ) ;
model . Contacttel = ds . Tables [ 0 ] . Rows [ 0 ] [ "Contacttel" ] . ToString ( ) ;
model . Province = ds . Tables [ 0 ] . Rows [ 0 ] [ "Province" ] . ToString ( ) ;
model . City = ds . Tables [ 0 ] . Rows [ 0 ] [ "City" ] . ToString ( ) ;
model . County = ds . Tables [ 0 ] . Rows [ 0 ] [ "County" ] . ToString ( ) ;
model . IFFill = Convert . ToInt32 ( ds . Tables [ 0 ] . Rows [ 0 ] [ "IFFill" ] . ToString ( ) ) ;
model . Tradingarea = ds . Tables [ 0 ] . Rows [ 0 ] [ "Tradingarea" ] . ToString ( ) ;
model . Address = ds . Tables [ 0 ] . Rows [ 0 ] [ "Address" ] . ToString ( ) ;
model . Address0 = ds . Tables [ 0 ] . Rows [ 0 ] [ "Address0" ] . ToString ( ) ;
model . Zipcode = ds . Tables [ 0 ] . Rows [ 0 ] [ "Zipcode" ] . ToString ( ) ;
model . yundanhao = ds . Tables [ 0 ] . Rows [ 0 ] [ "yundanhao" ] . ToString ( ) ;
model . kdcompay = ds . Tables [ 0 ] . Rows [ 0 ] [ "kdcompay" ] . ToString ( ) ;
model . Guests = ds . Tables [ 0 ] . Rows [ 0 ] [ "Guests" ] . ToString ( ) ;
model . wlremarks = ds . Tables [ 0 ] . Rows [ 0 ] [ "wlremarks" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice" ] . ToString ( ) ! = "" )
{
model . Totalprice = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice" ] . ToString ( ) ) ;
}
model . JFTotalprice = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "JFTotalprice" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice0" ] . ToString ( ) ! = "" )
{
model . Totalprice0 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice0" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice1" ] . ToString ( ) ! = "" )
{
model . Totalprice1 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice1" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice2" ] . ToString ( ) ! = "" )
{
model . Totalprice2 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice2" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice3" ] . ToString ( ) ! = "" )
{
model . Totalprice3 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice3" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice4" ] . ToString ( ) ! = "" )
{
model . Totalprice4 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice4" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice5" ] . ToString ( ) ! = "" )
{
model . Totalprice5 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice5" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice6" ] . ToString ( ) ! = "" )
{
model . Totalprice6 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice6" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice7" ] . ToString ( ) ! = "" )
{
model . Totalprice7 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice7" ] . ToString ( ) ) ;
}
model . Totalprice8 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice8" ] . ToString ( ) ) ;
model . Totalprice9 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice9" ] . ToString ( ) ) ;
model . Totalprice10 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice10" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalnum" ] . ToString ( ) ! = "" )
{
model . Totalnum = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalnum" ] . ToString ( ) ) ;
}
model . O_Submit = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Submit" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ! = "" )
{
model . O_SubmitDate = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ) ;
}
model . O_Submit = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Submit" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ! = "" )
{
model . O_SubmitDate = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ) ;
}
model . O_Payed = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Payed" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Payed_Date" ] . ToString ( ) ! = "" )
{
model . O_Payed_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Payed_Date" ] . ToString ( ) ) ;
}
model . O_Shipped = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Shipped" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Shipped_Date" ] . ToString ( ) ! = "" )
{
model . O_Shipped_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Shipped_Date" ] . ToString ( ) ) ;
}
model . O_received = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_received" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_received_Date" ] . ToString ( ) ! = "" )
{
model . O_received_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_received_Date" ] . ToString ( ) ) ;
}
model . O_Return = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Return" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Return_Date" ] . ToString ( ) ! = "" )
{
model . O_Return_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Return_Date" ] . ToString ( ) ) ;
}
model . O_Returned = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Returned" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Returned_Date" ] . ToString ( ) ! = "" )
{
model . O_Returned_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Returned_Date" ] . ToString ( ) ) ;
}
model . O_recReturn = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_recReturn" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_recReturn_Date" ] . ToString ( ) ! = "" )
{
model . O_recReturn_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_recReturn_Date" ] . ToString ( ) ) ;
}
model . O_yhj = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_yhj" ] . ToString ( ) ;
model . O_ReturnReason = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_ReturnReason" ] . ToString ( ) ;
model . utype = ds . Tables [ 0 ] . Rows [ 0 ] [ "utype" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "UserID" ] . ToString ( ) ! = "" )
{
model . UserID = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "UserID" ] . ToString ( ) ) ;
}
else
{
model . UserID = 0 ;
}
model . MemberId = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "MemberId" ] . ToString ( ) ) ;
model . ZTMemberId = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ZTMemberId" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "IFDelete" ] . ToString ( ) ! = "" )
{
model . IFDelete = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "IFDelete" ] . ToString ( ) ) ;
}
model . Isbuzhong = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Isbuzhong" ] . ToString ( ) ) ;
model . hasRead = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "hasRead" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Seef" ] . ToString ( ) ! = "" )
{
model . O_Seef = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Seef" ] . ToString ( ) ) ;
}
model . transaction_id = ds . Tables [ 0 ] . Rows [ 0 ] [ "transaction_id" ] . ToString ( ) ;
model . out_trade_no = ds . Tables [ 0 ] . Rows [ 0 ] [ "out_trade_no" ] . ToString ( ) ;
model . refund_id = ds . Tables [ 0 ] . Rows [ 0 ] [ "refund_id" ] . ToString ( ) ;
model . refundstatus = Convert . ToInt32 ( ds . Tables [ 0 ] . Rows [ 0 ] [ "refundstatus" ] . ToString ( ) ) ;
model . refund_channel = ds . Tables [ 0 ] . Rows [ 0 ] [ "refund_channel" ] . ToString ( ) ;
model . user_received_account = ds . Tables [ 0 ] . Rows [ 0 ] [ "user_received_account" ] . ToString ( ) ;
model . openid = ds . Tables [ 0 ] . Rows [ 0 ] [ "openid" ] . ToString ( ) ;
model . success_time = ds . Tables [ 0 ] . Rows [ 0 ] [ "success_time" ] . ToString ( ) ;
model . utype = ds . Tables [ 0 ] . Rows [ 0 ] [ "utype" ] . ToString ( ) ;
model . ttype = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ttype" ] . ToString ( ) ) ;
model . ttype0 = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ttype0" ] . ToString ( ) ) ;
model . ptype = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ptype" ] . ToString ( ) ) ;
model . ptgroup = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ptgroup" ] . ToString ( ) ) ;
model . ifxnhy = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifxnhy" ] . ToString ( ) ) ;
model . ypznum = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ypznum" ] . ToString ( ) ) ;
model . ifxhpt = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifxhpt" ] . ToString ( ) ) ;
model . ifpd = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifpd" ] . ToString ( ) ) ;
model . ifbhzshy = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifbhzshy" ] . ToString ( ) ) ;
model . peitype = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "peitype" ] . ToString ( ) ) ;
model . gtype = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "gtype" ] . ToString ( ) ) ;
return model ;
}
else
{
return null ;
}
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public Mtxfw . Model . order_info GetModelByOrder ( string OrderId )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "select top 1 * from order_info a" ) ;
strSql . Append ( " where OrderId=@OrderId" ) ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@OrderId" , SqlDbType . VarChar , 50 )
} ;
parameters [ 0 ] . Value = OrderId ;
Mtxfw . Model . order_info model = new Mtxfw . Model . order_info ( ) ;
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 ] [ "pid" ] . ToString ( ) ! = "" )
{
model . pid = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "pid" ] . ToString ( ) ) ;
}
model . poid = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "poid" ] . ToString ( ) ) ;
model . pcount = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "pcount" ] . ToString ( ) ) ;
model . ypcount = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ypcount" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "orderid" ] . ToString ( ) ! = "" )
{
model . orderid = ds . Tables [ 0 ] . Rows [ 0 ] [ "orderid" ] . ToString ( ) ;
}
model . orderhxm = ds . Tables [ 0 ] . Rows [ 0 ] [ "orderhxm" ] . ToString ( ) ;
model . selcolor = ds . Tables [ 0 ] . Rows [ 0 ] [ "selcolor" ] . ToString ( ) ;
model . guige = ds . Tables [ 0 ] . Rows [ 0 ] [ "guige" ] . ToString ( ) ;
model . Contactname = ds . Tables [ 0 ] . Rows [ 0 ] [ "Contactname" ] . ToString ( ) ;
model . Contacttel = ds . Tables [ 0 ] . Rows [ 0 ] [ "Contacttel" ] . ToString ( ) ;
model . Province = ds . Tables [ 0 ] . Rows [ 0 ] [ "Province" ] . ToString ( ) ;
model . City = ds . Tables [ 0 ] . Rows [ 0 ] [ "City" ] . ToString ( ) ;
model . County = ds . Tables [ 0 ] . Rows [ 0 ] [ "County" ] . ToString ( ) ;
model . IFFill = Convert . ToInt32 ( ds . Tables [ 0 ] . Rows [ 0 ] [ "IFFill" ] . ToString ( ) ) ;
model . Tradingarea = ds . Tables [ 0 ] . Rows [ 0 ] [ "Tradingarea" ] . ToString ( ) ;
model . Address = ds . Tables [ 0 ] . Rows [ 0 ] [ "Address" ] . ToString ( ) ;
model . Address0 = ds . Tables [ 0 ] . Rows [ 0 ] [ "Address0" ] . ToString ( ) ;
model . Zipcode = ds . Tables [ 0 ] . Rows [ 0 ] [ "Zipcode" ] . ToString ( ) ;
model . yundanhao = ds . Tables [ 0 ] . Rows [ 0 ] [ "yundanhao" ] . ToString ( ) ;
model . kdcompay = ds . Tables [ 0 ] . Rows [ 0 ] [ "kdcompay" ] . ToString ( ) ;
model . Guests = ds . Tables [ 0 ] . Rows [ 0 ] [ "Guests" ] . ToString ( ) ;
model . wlremarks = ds . Tables [ 0 ] . Rows [ 0 ] [ "wlremarks" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice" ] . ToString ( ) ! = "" )
{
model . Totalprice = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice0" ] . ToString ( ) ! = "" )
{
model . Totalprice0 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice0" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice1" ] . ToString ( ) ! = "" )
{
model . Totalprice1 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice1" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice2" ] . ToString ( ) ! = "" )
{
model . Totalprice2 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice2" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice3" ] . ToString ( ) ! = "" )
{
model . Totalprice3 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice3" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice4" ] . ToString ( ) ! = "" )
{
model . Totalprice4 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice4" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice5" ] . ToString ( ) ! = "" )
{
model . Totalprice5 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice5" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice6" ] . ToString ( ) ! = "" )
{
model . Totalprice6 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice6" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice7" ] . ToString ( ) ! = "" )
{
model . Totalprice7 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice7" ] . ToString ( ) ) ;
}
model . Totalprice8 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice8" ] . ToString ( ) ) ;
model . Totalprice9 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice9" ] . ToString ( ) ) ;
model . Totalprice10 = Convert . ToDouble ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalprice10" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalnum" ] . ToString ( ) ! = "" )
{
model . Totalnum = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Totalnum" ] . ToString ( ) ) ;
}
model . O_Submit = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Submit" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ! = "" )
{
model . O_SubmitDate = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ) ;
}
model . O_Submit = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Submit" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ! = "" )
{
model . O_SubmitDate = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_SubmitDate" ] . ToString ( ) ) ;
}
model . O_Payed = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Payed" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Payed_Date" ] . ToString ( ) ! = "" )
{
model . O_Payed_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Payed_Date" ] . ToString ( ) ) ;
}
model . O_Shipped = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Shipped" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Shipped_Date" ] . ToString ( ) ! = "" )
{
model . O_Shipped_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Shipped_Date" ] . ToString ( ) ) ;
}
model . O_received = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_received" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_received_Date" ] . ToString ( ) ! = "" )
{
model . O_received_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_received_Date" ] . ToString ( ) ) ;
}
model . O_Return = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Return" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Return_Date" ] . ToString ( ) ! = "" )
{
model . O_Return_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Return_Date" ] . ToString ( ) ) ;
}
model . O_Returned = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Returned" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Returned_Date" ] . ToString ( ) ! = "" )
{
model . O_Returned_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Returned_Date" ] . ToString ( ) ) ;
}
model . O_recReturn = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_recReturn" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_recReturn_Date" ] . ToString ( ) ! = "" )
{
model . O_recReturn_Date = DateTime . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_recReturn_Date" ] . ToString ( ) ) ;
}
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "UserID" ] . ToString ( ) ! = "" )
{
model . UserID = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "UserID" ] . ToString ( ) ) ;
}
model . MemberId = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "MemberId" ] . ToString ( ) ) ;
model . ZTMemberId = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ZTMemberId" ] . ToString ( ) ) ;
model . utype = ds . Tables [ 0 ] . Rows [ 0 ] [ "utype" ] . ToString ( ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "IFDelete" ] . ToString ( ) ! = "" )
{
model . IFDelete = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "IFDelete" ] . ToString ( ) ) ;
}
model . Isbuzhong = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "Isbuzhong" ] . ToString ( ) ) ;
model . hasRead = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "hasRead" ] . ToString ( ) ) ;
if ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Seef" ] . ToString ( ) ! = "" )
{
model . O_Seef = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "O_Seef" ] . ToString ( ) ) ;
}
model . O_yhj = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_yhj" ] . ToString ( ) ;
model . O_ReturnReason = ds . Tables [ 0 ] . Rows [ 0 ] [ "O_ReturnReason" ] . ToString ( ) ;
model . transaction_id = ds . Tables [ 0 ] . Rows [ 0 ] [ "transaction_id" ] . ToString ( ) ;
model . out_trade_no = ds . Tables [ 0 ] . Rows [ 0 ] [ "out_trade_no" ] . ToString ( ) ;
model . refund_id = ds . Tables [ 0 ] . Rows [ 0 ] [ "refund_id" ] . ToString ( ) ;
model . refundstatus = Convert . ToInt32 ( ds . Tables [ 0 ] . Rows [ 0 ] [ "refundstatus" ] . ToString ( ) ) ;
model . refund_channel = ds . Tables [ 0 ] . Rows [ 0 ] [ "refund_channel" ] . ToString ( ) ;
model . user_received_account = ds . Tables [ 0 ] . Rows [ 0 ] [ "user_received_account" ] . ToString ( ) ;
model . success_time = ds . Tables [ 0 ] . Rows [ 0 ] [ "success_time" ] . ToString ( ) ;
model . openid = ds . Tables [ 0 ] . Rows [ 0 ] [ "openid" ] . ToString ( ) ;
model . utype = ds . Tables [ 0 ] . Rows [ 0 ] [ "utype" ] . ToString ( ) ;
model . ttype = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ttype" ] . ToString ( ) ) ;
model . ptype = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ptype" ] . ToString ( ) ) ;
model . ptgroup = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ptgroup" ] . ToString ( ) ) ;
model . ifxnhy = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifxnhy" ] . ToString ( ) ) ;
model . ypznum = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ypznum" ] . ToString ( ) ) ;
model . ifxhpt = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifxhpt" ] . ToString ( ) ) ;
model . ifpd = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifpd" ] . ToString ( ) ) ;
model . ifbhzshy = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "ifbhzshy" ] . ToString ( ) ) ;
model . peitype = int . Parse ( ds . Tables [ 0 ] . Rows [ 0 ] [ "peitype" ] . 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 * FROM order_info a" ) ;
if ( strWhere . Trim ( ) ! = "" )
{
strSql . Append ( " where " + strWhere ) ;
}
return Mtxfw . Utility . SqlDbHelper_U . GetDataSet ( strSql . ToString ( ) ) ;
}
public int GetMaxNumber ( string utype )
{
string sql = "select top 1 isnull(max(orderid),0) from order_info Where utype=@utype" ;
SqlParameter [ ] parameters = {
new SqlParameter ( "@utype" , SqlDbType . VarChar , 50 )
} ;
parameters [ 0 ] . Value = utype ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteScalar ( sql , parameters ) ;
}
/// <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 ( " * FROM order_info " ) ;
if ( strWhere . Trim ( ) ! = "" )
{
strSql . Append ( " where " + strWhere ) ;
}
strSql . Append ( " order by " + filedOrder ) ;
return Mtxfw . Utility . SqlDbHelper_U . GetDataSet ( strSql . ToString ( ) ) ;
}
public DataSet GetViewList ( int Top , string strWhere )
{
StringBuilder strSql = new StringBuilder ( ) ;
strSql . Append ( "select " ) ;
if ( Top > 0 )
{
strSql . Append ( " top " + Top . ToString ( ) ) ;
}
strSql . Append ( " * FROM order_info_view " ) ;
if ( strWhere . Trim ( ) ! = "" )
{
strSql . Append ( " where " + strWhere ) ;
}
return Mtxfw . Utility . SqlDbHelper_U . GetDataSet ( strSql . ToString ( ) ) ;
}
/// <summary>
/// 假删除
/// </summary>
public int UpdateIFDelete ( int IFDelete , string IFDeleteTime , Int32 Id )
{
String sql = "update [order_info] 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 ) ;
}
public int UpdateIFDelete ( int IFDelete , string IFDeleteTime , string where )
{
String sql = "update [order_info] 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 UpdateIFDelete0 ( int IFDelete , string IFDeleteTime , Int32 Id )
{
String sql = "update [order_info] set IFDelete=@IFDelete,IFDeleteTime=@IFDeleteTime where Id=@Id or poid=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@IFDelete" , SqlDbType . Int ) ,
new SqlParameter ( "@IFDeleteTime" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@Id" , SqlDbType . Int ) } ;
para [ 0 ] . Value = IFDelete ;
para [ 1 ] . Value = IFDeleteTime ;
para [ 2 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 假删除
/// </summary>
public int UpdateIFDelete1 ( int IFDelete , string IFDeleteTime , Int32 bqqs )
{
String sql = "update [order_info] set IFDelete=@IFDelete,IFDeleteTime=@IFDeleteTime where ttype=2 and ptype=0 and IFDelete=0 and poid=@bqqs" ;
SqlParameter [ ] para = { new SqlParameter ( "@IFDelete" , SqlDbType . Int ) ,
new SqlParameter ( "@IFDeleteTime" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@bqqs" , SqlDbType . Int ) } ;
para [ 0 ] . Value = IFDelete ;
para [ 1 ] . Value = IFDeleteTime ;
para [ 2 ] . Value = bqqs ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
/// <summary>
/// 结算
/// </summary>
public int UpdateSeef ( int O_Seef , string O_Seef_Date , Int32 Id )
{
String sql = "update [order_info] set O_Seef=@O_Seef,O_Seef_Date=@O_Seef_Date where Id=@Id" ;
SqlParameter [ ] para = { new SqlParameter ( "@O_Seef" , SqlDbType . Int ) ,
new SqlParameter ( "@O_Seef_Date" , SqlDbType . VarChar , 50 ) ,
new SqlParameter ( "@Id" , SqlDbType . BigInt ) } ;
para [ 0 ] . Value = O_Seef ;
para [ 1 ] . Value = O_Seef_Date ;
para [ 2 ] . Value = Id ;
return Mtxfw . Utility . SqlDbHelper_U . ExecuteCmd ( sql , para ) ;
}
}
}