You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWeb/Areas/SoftMng/DAL/op_apply.cs

767 lines
58 KiB
C#

using System;
using System.Text;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Data;
using DSWeb.SoftMng.DBUtility;
// ReSharper disable once CheckNamespace
namespace DSWeb.SoftMng.DAL
{
//op_apply
public partial class op_applyDAL
{
public bool Exists(string BSNO,string MASTERNO,string CUSTNO)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("select count(1) from op_apply");
strSql.Append(" where ");
strSql.Append(" BSNO = @BSNO and ");
strSql.Append(" MASTERNO = @MASTERNO and ");
strSql.Append(" CUSTNO = @CUSTNO ");
SqlParameter[] parameters = {
new SqlParameter("@BSNO", SqlDbType.VarChar,100),
new SqlParameter("@MASTERNO", SqlDbType.VarChar,100),
new SqlParameter("@CUSTNO", SqlDbType.VarChar,30) };
parameters[0].Value = BSNO;
parameters[1].Value = MASTERNO;
parameters[2].Value = CUSTNO;
return DbHelperSQL.Exists(strSql.ToString(),parameters);
}
/// <summary>
/// 增加一条数据
/// </summary>
public int Add(DSWeb.SoftMng.Model.op_apply model)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("insert into op_apply(");
strSql.Append("BSNO,MASTERNO,CUSTNO,BSTYPE,BSSTATUS,FEESTATUS,BSDATE,ACCDATE,BSSOURCE,BSSOURCEDETAIL,MBLNO,CUSTOMERNAME,CUSTOMNO,VESSEL,VOYNO,ETD,ETA,PORTLOAD,PORTDISCHARGE,PKGS,KINDPKGS,KGS,CBM,OP,SALE,INVNO,CONTRACTNO,ENTERPID,ENTERP,ARCOUNTRY,GOODSOURCE,DOCNO,REMARK,TimeMark,INPUTBY,CORPID,CUSTOMSER,NETWEIGHT,SALEDEPT,INSPECTIONNO,INSPECTIONDATE,TRADETYPE,BOOKNO,IsService1,IsService2,IsService3,IsService4,IsService5,IsService6,CUSTOMDATE,BYCUSTOM,HBLNO,IsServiceFee1,IsServiceFee2,IsServiceFee3,IsServiceFee4,IsServiceFee5,IsServiceFee6,OPDATE,MANIFESTSTATUS,IsService9,IsService10,IsService11,IsService12,IsService13,IsService14,IsService15,IsService16,IsServiceFee9,IsServiceFee10,IsServiceFee11,IsServiceFee12,IsServiceFee13,IsServiceFee14,IsServiceFee15,IsServiceFee16,CLEARCUSTOMDATE,ISMOREGOOD,INSPECTSERVICE,CUSTOMSNUM,TRADETERM,BSCUSTOMNO,ISPRINTPR,CUSTOMTYPE,ISCLEAR,ISCUSTOMEND,CUSTOMSLNO,WMSNO,ediYwlx,recordSn,payMent,carriageType,carriagePrice,carriageCurrency,premiumType,premiumPrice,premiumCurrency,CNTR1,CNTR2,CNTR3,CNTR4,CNTR5,CNTR6,CNTR7,CNTR8,CNTR9,CNTR10,OTCNTR,TEU,ISVOU,VOUNO,SALECORPID,IsService7,IsService8,IsServiceFee7,IsServiceFee8");
strSql.Append(") values (");
strSql.Append("@BSNO,@MASTERNO,@CUSTNO,@BSTYPE,@BSSTATUS,@FEESTATUS,@BSDATE,@ACCDATE,@BSSOURCE,@BSSOURCEDETAIL,@MBLNO,@CUSTOMERNAME,@CUSTOMNO,@VESSEL,@VOYNO,@ETD,@ETA,@PORTLOAD,@PORTDISCHARGE,@PKGS,@KINDPKGS,@KGS,@CBM,@OP,@SALE,@INVNO,@CONTRACTNO,@ENTERPID,@ENTERP,@ARCOUNTRY,@GOODSOURCE,@DOCNO,@REMARK,@TimeMark,@INPUTBY,@CORPID,@CUSTOMSER,@NETWEIGHT,@SALEDEPT,@INSPECTIONNO,@INSPECTIONDATE,@TRADETYPE,@BOOKNO,@IsService1,@IsService2,@IsService3,@IsService4,@IsService5,@IsService6,@CUSTOMDATE,@BYCUSTOM,@HBLNO,@IsServiceFee1,@IsServiceFee2,@IsServiceFee3,@IsServiceFee4,@IsServiceFee5,@IsServiceFee6,@OPDATE,@MANIFESTSTATUS,@IsService9,@IsService10,@IsService11,@IsService12,@IsService13,@IsService14,@IsService15,@IsService16,@IsServiceFee9,@IsServiceFee10,@IsServiceFee11,@IsServiceFee12,@IsServiceFee13,@IsServiceFee14,@IsServiceFee15,@IsServiceFee16,@CLEARCUSTOMDATE,@ISMOREGOOD,@INSPECTSERVICE,@CUSTOMSNUM,@TRADETERM,@BSCUSTOMNO,@ISPRINTPR,@CUSTOMTYPE,@ISCLEAR,@ISCUSTOMEND,@CUSTOMSLNO,@WMSNO,@ediYwlx,@recordSn,@payMent,@carriageType,@carriagePrice,@carriageCurrency,@premiumType,@premiumPrice,@premiumCurrency,@CNTR1,@CNTR2,@CNTR3,@CNTR4,@CNTR5,@CNTR6,@CNTR7,@CNTR8,@CNTR9,@CNTR10,@OTCNTR,@TEU,@ISVOU,@VOUNO,@SALECORPID,@IsService7,@IsService8,@IsServiceFee7,@IsServiceFee8");
strSql.Append(") ");
SqlParameter[] parameters = {
new SqlParameter("@BSNO", SqlDbType.VarChar,100) ,
new SqlParameter("@MASTERNO", SqlDbType.VarChar,100) ,
new SqlParameter("@CUSTNO", SqlDbType.VarChar,30) ,
new SqlParameter("@BSTYPE", SqlDbType.VarChar,12) ,
new SqlParameter("@BSSTATUS", SqlDbType.Bit,1) ,
new SqlParameter("@FEESTATUS", SqlDbType.Bit,1) ,
new SqlParameter("@BSDATE", SqlDbType.SmallDateTime) ,
new SqlParameter("@ACCDATE", SqlDbType.VarChar,7) ,
new SqlParameter("@BSSOURCE", SqlDbType.VarChar,36) ,
new SqlParameter("@BSSOURCEDETAIL", SqlDbType.VarChar,36) ,
new SqlParameter("@MBLNO", SqlDbType.VarChar,30) ,
new SqlParameter("@CUSTOMERNAME", SqlDbType.VarChar,20) ,
new SqlParameter("@CUSTOMNO", SqlDbType.VarChar,20) ,
new SqlParameter("@VESSEL", SqlDbType.VarChar,60) ,
new SqlParameter("@VOYNO", SqlDbType.VarChar,12) ,
new SqlParameter("@ETD", SqlDbType.VarChar,10) ,
new SqlParameter("@ETA", SqlDbType.VarChar,10) ,
new SqlParameter("@PORTLOAD", SqlDbType.VarChar,60) ,
new SqlParameter("@PORTDISCHARGE", SqlDbType.VarChar,60) ,
new SqlParameter("@PKGS", SqlDbType.Int,4) ,
new SqlParameter("@KINDPKGS", SqlDbType.VarChar,20) ,
new SqlParameter("@KGS", SqlDbType.Decimal,9) ,
new SqlParameter("@CBM", SqlDbType.Decimal,9) ,
new SqlParameter("@OP", SqlDbType.VarChar,10) ,
new SqlParameter("@SALE", SqlDbType.VarChar,10) ,
new SqlParameter("@INVNO", SqlDbType.VarChar,20) ,
new SqlParameter("@CONTRACTNO", SqlDbType.VarChar,100) ,
new SqlParameter("@ENTERPID", SqlDbType.VarChar,20) ,
new SqlParameter("@ENTERP", SqlDbType.VarChar,60) ,
new SqlParameter("@ARCOUNTRY", SqlDbType.VarChar,20) ,
new SqlParameter("@GOODSOURCE", SqlDbType.VarChar,60) ,
new SqlParameter("@DOCNO", SqlDbType.VarChar,20) ,
new SqlParameter("@REMARK", SqlDbType.VarChar,200) ,
new SqlParameter("@TimeMark", SqlDbType.Decimal,13) ,
new SqlParameter("@INPUTBY", SqlDbType.VarChar,10) ,
new SqlParameter("@CORPID", SqlDbType.VarChar,36) ,
new SqlParameter("@CUSTOMSER", SqlDbType.VarChar,20) ,
new SqlParameter("@NETWEIGHT", SqlDbType.Decimal,9) ,
new SqlParameter("@SALEDEPT", SqlDbType.VarChar,20) ,
new SqlParameter("@INSPECTIONNO", SqlDbType.VarChar,20) ,
new SqlParameter("@INSPECTIONDATE", SqlDbType.VarChar,10) ,
new SqlParameter("@TRADETYPE", SqlDbType.VarChar,20) ,
new SqlParameter("@BOOKNO", SqlDbType.VarChar,30) ,
new SqlParameter("@IsService1", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService2", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService3", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService4", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService5", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService6", SqlDbType.VarChar,1) ,
new SqlParameter("@CUSTOMDATE", SqlDbType.VarChar,10) ,
new SqlParameter("@BYCUSTOM", SqlDbType.VarChar,20) ,
new SqlParameter("@HBLNO", SqlDbType.VarChar,30) ,
new SqlParameter("@IsServiceFee1", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee2", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee3", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee4", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee5", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee6", SqlDbType.VarChar,1) ,
new SqlParameter("@OPDATE", SqlDbType.VarChar,10) ,
new SqlParameter("@MANIFESTSTATUS", SqlDbType.VarChar,10) ,
new SqlParameter("@IsService9", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService10", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService11", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService12", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService13", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService14", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService15", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService16", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee9", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee10", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee11", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee12", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee13", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee14", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee15", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee16", SqlDbType.VarChar,1) ,
new SqlParameter("@CLEARCUSTOMDATE", SqlDbType.DateTime) ,
new SqlParameter("@ISMOREGOOD", SqlDbType.Bit,1) ,
new SqlParameter("@INSPECTSERVICE", SqlDbType.VarChar,20) ,
new SqlParameter("@CUSTOMSNUM", SqlDbType.SmallInt,2) ,
new SqlParameter("@TRADETERM", SqlDbType.VarChar,20) ,
new SqlParameter("@BSCUSTOMNO", SqlDbType.VarChar,50) ,
new SqlParameter("@ISPRINTPR", SqlDbType.VarChar,1) ,
new SqlParameter("@CUSTOMTYPE", SqlDbType.VarChar,20) ,
new SqlParameter("@ISCLEAR", SqlDbType.VarChar,1) ,
new SqlParameter("@ISCUSTOMEND", SqlDbType.VarChar,1) ,
new SqlParameter("@CUSTOMSLNO", SqlDbType.VarChar,20) ,
new SqlParameter("@WMSNO", SqlDbType.VarChar,100) ,
new SqlParameter("@ediYwlx", SqlDbType.Int,4) ,
new SqlParameter("@recordSn", SqlDbType.VarChar,12) ,
new SqlParameter("@payMent", SqlDbType.VarChar,4) ,
new SqlParameter("@carriageType", SqlDbType.VarChar,10) ,
new SqlParameter("@carriagePrice", SqlDbType.Decimal,9) ,
new SqlParameter("@carriageCurrency", SqlDbType.VarChar,6) ,
new SqlParameter("@premiumType", SqlDbType.VarChar,10) ,
new SqlParameter("@premiumPrice", SqlDbType.Decimal,9) ,
new SqlParameter("@premiumCurrency", SqlDbType.VarChar,6) ,
new SqlParameter("@CNTR1", SqlDbType.Int,4) ,
new SqlParameter("@CNTR2", SqlDbType.Int,4) ,
new SqlParameter("@CNTR3", SqlDbType.Int,4) ,
new SqlParameter("@CNTR4", SqlDbType.Int,4) ,
new SqlParameter("@CNTR5", SqlDbType.Int,4) ,
new SqlParameter("@CNTR6", SqlDbType.Int,4) ,
new SqlParameter("@CNTR7", SqlDbType.Int,4) ,
new SqlParameter("@CNTR8", SqlDbType.Int,4) ,
new SqlParameter("@CNTR9", SqlDbType.Int,4) ,
new SqlParameter("@CNTR10", SqlDbType.Int,4) ,
new SqlParameter("@OTCNTR", SqlDbType.Int,4) ,
new SqlParameter("@TEU", SqlDbType.Int,4) ,
new SqlParameter("@ISVOU", SqlDbType.Bit,1) ,
new SqlParameter("@VOUNO", SqlDbType.VarChar,12) ,
new SqlParameter("@SALECORPID", SqlDbType.VarChar,36) ,
new SqlParameter("@IsService7", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService8", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee7", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee8", SqlDbType.VarChar,1)
};
parameters[0].Value = model.BSNO??(Object)DBNull.Value;
parameters[1].Value = model.MASTERNO??(Object)DBNull.Value;
parameters[2].Value = model.CUSTNO??(Object)DBNull.Value;
parameters[3].Value = model.BSTYPE??(Object)DBNull.Value;
parameters[4].Value = model.BSSTATUS;
parameters[5].Value = model.FEESTATUS;
parameters[6].Value = model.BSDATE;
parameters[7].Value = model.ACCDATE??(Object)DBNull.Value;
parameters[8].Value = model.BSSOURCE??(Object)DBNull.Value;
parameters[9].Value = model.BSSOURCEDETAIL??(Object)DBNull.Value;
parameters[10].Value = model.MBLNO??(Object)DBNull.Value;
parameters[11].Value = model.CUSTOMERNAME??(Object)DBNull.Value;
parameters[12].Value = model.CUSTOMNO??(Object)DBNull.Value;
parameters[13].Value = model.VESSEL??(Object)DBNull.Value;
parameters[14].Value = model.VOYNO??(Object)DBNull.Value;
parameters[15].Value = model.ETD??(Object)DBNull.Value;
parameters[16].Value = model.ETA??(Object)DBNull.Value;
parameters[17].Value = model.PORTLOAD??(Object)DBNull.Value;
parameters[18].Value = model.PORTDISCHARGE??(Object)DBNull.Value;
parameters[19].Value = model.PKGS??(Object)DBNull.Value;
parameters[20].Value = model.KINDPKGS??(Object)DBNull.Value;
parameters[21].Value = model.KGS??(Object)DBNull.Value;
parameters[22].Value = model.CBM??(Object)DBNull.Value;
parameters[23].Value = model.OP??(Object)DBNull.Value;
parameters[24].Value = model.SALE??(Object)DBNull.Value;
parameters[25].Value = model.INVNO??(Object)DBNull.Value;
parameters[26].Value = model.CONTRACTNO??(Object)DBNull.Value;
parameters[27].Value = model.ENTERPID??(Object)DBNull.Value;
parameters[28].Value = model.ENTERP??(Object)DBNull.Value;
parameters[29].Value = model.ARCOUNTRY??(Object)DBNull.Value;
parameters[30].Value = model.GOODSOURCE??(Object)DBNull.Value;
parameters[31].Value = model.DOCNO??(Object)DBNull.Value;
parameters[32].Value = model.REMARK??(Object)DBNull.Value;
parameters[33].Value = model.TimeMark??(Object)DBNull.Value;
parameters[34].Value = model.INPUTBY??(Object)DBNull.Value;
parameters[35].Value = model.CORPID??(Object)DBNull.Value;
parameters[36].Value = model.CUSTOMSER??(Object)DBNull.Value;
parameters[37].Value = model.NETWEIGHT??(Object)DBNull.Value;
parameters[38].Value = model.SALEDEPT??(Object)DBNull.Value;
parameters[39].Value = model.INSPECTIONNO??(Object)DBNull.Value;
parameters[40].Value = model.INSPECTIONDATE??(Object)DBNull.Value;
parameters[41].Value = model.TRADETYPE??(Object)DBNull.Value;
parameters[42].Value = model.BOOKNO??(Object)DBNull.Value;
parameters[43].Value = model.IsService1??(Object)DBNull.Value;
parameters[44].Value = model.IsService2??(Object)DBNull.Value;
parameters[45].Value = model.IsService3??(Object)DBNull.Value;
parameters[46].Value = model.IsService4??(Object)DBNull.Value;
parameters[47].Value = model.IsService5??(Object)DBNull.Value;
parameters[48].Value = model.IsService6??(Object)DBNull.Value;
parameters[49].Value = model.CUSTOMDATE??(Object)DBNull.Value;
parameters[50].Value = model.BYCUSTOM??(Object)DBNull.Value;
parameters[51].Value = model.HBLNO??(Object)DBNull.Value;
parameters[52].Value = model.IsServiceFee1??(Object)DBNull.Value;
parameters[53].Value = model.IsServiceFee2??(Object)DBNull.Value;
parameters[54].Value = model.IsServiceFee3??(Object)DBNull.Value;
parameters[55].Value = model.IsServiceFee4??(Object)DBNull.Value;
parameters[56].Value = model.IsServiceFee5??(Object)DBNull.Value;
parameters[57].Value = model.IsServiceFee6??(Object)DBNull.Value;
parameters[58].Value = model.OPDATE??(Object)DBNull.Value;
parameters[59].Value = model.MANIFESTSTATUS??(Object)DBNull.Value;
parameters[60].Value = model.IsService9??(Object)DBNull.Value;
parameters[61].Value = model.IsService10??(Object)DBNull.Value;
parameters[62].Value = model.IsService11??(Object)DBNull.Value;
parameters[63].Value = model.IsService12??(Object)DBNull.Value;
parameters[64].Value = model.IsService13??(Object)DBNull.Value;
parameters[65].Value = model.IsService14??(Object)DBNull.Value;
parameters[66].Value = model.IsService15??(Object)DBNull.Value;
parameters[67].Value = model.IsService16??(Object)DBNull.Value;
parameters[68].Value = model.IsServiceFee9??(Object)DBNull.Value;
parameters[69].Value = model.IsServiceFee10??(Object)DBNull.Value;
parameters[70].Value = model.IsServiceFee11??(Object)DBNull.Value;
parameters[71].Value = model.IsServiceFee12??(Object)DBNull.Value;
parameters[72].Value = model.IsServiceFee13??(Object)DBNull.Value;
parameters[73].Value = model.IsServiceFee14??(Object)DBNull.Value;
parameters[74].Value = model.IsServiceFee15??(Object)DBNull.Value;
parameters[75].Value = model.IsServiceFee16??(Object)DBNull.Value;
parameters[76].Value = model.CLEARCUSTOMDATE??(Object)DBNull.Value;
parameters[77].Value = model.ISMOREGOOD??(Object)DBNull.Value;
parameters[78].Value = model.INSPECTSERVICE??(Object)DBNull.Value;
parameters[79].Value = model.CUSTOMSNUM??(Object)DBNull.Value;
parameters[80].Value = model.TRADETERM??(Object)DBNull.Value;
parameters[81].Value = model.BSCUSTOMNO??(Object)DBNull.Value;
parameters[82].Value = model.ISPRINTPR??(Object)DBNull.Value;
parameters[83].Value = model.CUSTOMTYPE??(Object)DBNull.Value;
parameters[84].Value = model.ISCLEAR??(Object)DBNull.Value;
parameters[85].Value = model.ISCUSTOMEND??(Object)DBNull.Value;
parameters[86].Value = model.CUSTOMSLNO??(Object)DBNull.Value;
parameters[87].Value = model.WMSNO??(Object)DBNull.Value;
parameters[88].Value = model.ediYwlx??(Object)DBNull.Value;
parameters[89].Value = model.recordSn??(Object)DBNull.Value;
parameters[90].Value = model.payMent??(Object)DBNull.Value;
parameters[91].Value = model.carriageType??(Object)DBNull.Value;
parameters[92].Value = model.carriagePrice??(Object)DBNull.Value;
parameters[93].Value = model.carriageCurrency??(Object)DBNull.Value;
parameters[94].Value = model.premiumType??(Object)DBNull.Value;
parameters[95].Value = model.premiumPrice??(Object)DBNull.Value;
parameters[96].Value = model.premiumCurrency??(Object)DBNull.Value;
parameters[97].Value = model.CNTR1??(Object)DBNull.Value;
parameters[98].Value = model.CNTR2??(Object)DBNull.Value;
parameters[99].Value = model.CNTR3??(Object)DBNull.Value;
parameters[100].Value = model.CNTR4??(Object)DBNull.Value;
parameters[101].Value = model.CNTR5??(Object)DBNull.Value;
parameters[102].Value = model.CNTR6??(Object)DBNull.Value;
parameters[103].Value = model.CNTR7??(Object)DBNull.Value;
parameters[104].Value = model.CNTR8??(Object)DBNull.Value;
parameters[105].Value = model.CNTR9??(Object)DBNull.Value;
parameters[106].Value = model.CNTR10??(Object)DBNull.Value;
parameters[107].Value = model.OTCNTR??(Object)DBNull.Value;
parameters[108].Value = model.TEU??(Object)DBNull.Value;
parameters[109].Value = model.ISVOU??(Object)DBNull.Value;
parameters[110].Value = model.VOUNO??(Object)DBNull.Value;
parameters[111].Value = model.SALECORPID??(Object)DBNull.Value;
parameters[112].Value = model.IsService7??(Object)DBNull.Value;
parameters[113].Value = model.IsService8??(Object)DBNull.Value;
parameters[114].Value = model.IsServiceFee7??(Object)DBNull.Value;
parameters[115].Value = model.IsServiceFee8??(Object)DBNull.Value;
return DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
}
/// <summary>
/// 更新一条数据
/// </summary>
public int Update(DSWeb.SoftMng.Model.op_apply model)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("update op_apply set ");
strSql.Append(" BSNO = @BSNO,");
strSql.Append(" MASTERNO = @MASTERNO,");
strSql.Append(" CUSTNO = @CUSTNO,");
strSql.Append(" BSTYPE = @BSTYPE,");
strSql.Append(" BSSTATUS = @BSSTATUS,");
strSql.Append(" FEESTATUS = @FEESTATUS,");
strSql.Append(" BSDATE = @BSDATE,");
strSql.Append(" ACCDATE = @ACCDATE,");
strSql.Append(" BSSOURCE = @BSSOURCE,");
strSql.Append(" BSSOURCEDETAIL = @BSSOURCEDETAIL,");
strSql.Append(" MBLNO = @MBLNO,");
strSql.Append(" CUSTOMERNAME = @CUSTOMERNAME,");
strSql.Append(" CUSTOMNO = @CUSTOMNO,");
strSql.Append(" VESSEL = @VESSEL,");
strSql.Append(" VOYNO = @VOYNO,");
strSql.Append(" ETD = @ETD,");
strSql.Append(" ETA = @ETA,");
strSql.Append(" PORTLOAD = @PORTLOAD,");
strSql.Append(" PORTDISCHARGE = @PORTDISCHARGE,");
strSql.Append(" PKGS = @PKGS,");
strSql.Append(" KINDPKGS = @KINDPKGS,");
strSql.Append(" KGS = @KGS,");
strSql.Append(" CBM = @CBM,");
strSql.Append(" OP = @OP,");
strSql.Append(" SALE = @SALE,");
strSql.Append(" INVNO = @INVNO,");
strSql.Append(" CONTRACTNO = @CONTRACTNO,");
strSql.Append(" ENTERPID = @ENTERPID,");
strSql.Append(" ENTERP = @ENTERP,");
strSql.Append(" ARCOUNTRY = @ARCOUNTRY,");
strSql.Append(" GOODSOURCE = @GOODSOURCE,");
strSql.Append(" DOCNO = @DOCNO,");
strSql.Append(" REMARK = @REMARK,");
strSql.Append(" TimeMark = @TimeMark,");
strSql.Append(" INPUTBY = @INPUTBY,");
strSql.Append(" CORPID = @CORPID,");
strSql.Append(" CUSTOMSER = @CUSTOMSER,");
strSql.Append(" NETWEIGHT = @NETWEIGHT,");
strSql.Append(" SALEDEPT = @SALEDEPT,");
strSql.Append(" INSPECTIONNO = @INSPECTIONNO,");
strSql.Append(" INSPECTIONDATE = @INSPECTIONDATE,");
strSql.Append(" TRADETYPE = @TRADETYPE,");
strSql.Append(" BOOKNO = @BOOKNO,");
strSql.Append(" IsService1 = @IsService1,");
strSql.Append(" IsService2 = @IsService2,");
strSql.Append(" IsService3 = @IsService3,");
strSql.Append(" IsService4 = @IsService4,");
strSql.Append(" IsService5 = @IsService5,");
strSql.Append(" IsService6 = @IsService6,");
strSql.Append(" CUSTOMDATE = @CUSTOMDATE,");
strSql.Append(" BYCUSTOM = @BYCUSTOM,");
strSql.Append(" HBLNO = @HBLNO,");
strSql.Append(" IsServiceFee1 = @IsServiceFee1,");
strSql.Append(" IsServiceFee2 = @IsServiceFee2,");
strSql.Append(" IsServiceFee3 = @IsServiceFee3,");
strSql.Append(" IsServiceFee4 = @IsServiceFee4,");
strSql.Append(" IsServiceFee5 = @IsServiceFee5,");
strSql.Append(" IsServiceFee6 = @IsServiceFee6,");
strSql.Append(" OPDATE = @OPDATE,");
strSql.Append(" MANIFESTSTATUS = @MANIFESTSTATUS,");
strSql.Append(" IsService9 = @IsService9,");
strSql.Append(" IsService10 = @IsService10,");
strSql.Append(" IsService11 = @IsService11,");
strSql.Append(" IsService12 = @IsService12,");
strSql.Append(" IsService13 = @IsService13,");
strSql.Append(" IsService14 = @IsService14,");
strSql.Append(" IsService15 = @IsService15,");
strSql.Append(" IsService16 = @IsService16,");
strSql.Append(" IsServiceFee9 = @IsServiceFee9,");
strSql.Append(" IsServiceFee10 = @IsServiceFee10,");
strSql.Append(" IsServiceFee11 = @IsServiceFee11,");
strSql.Append(" IsServiceFee12 = @IsServiceFee12,");
strSql.Append(" IsServiceFee13 = @IsServiceFee13,");
strSql.Append(" IsServiceFee14 = @IsServiceFee14,");
strSql.Append(" IsServiceFee15 = @IsServiceFee15,");
strSql.Append(" IsServiceFee16 = @IsServiceFee16,");
strSql.Append(" CLEARCUSTOMDATE = @CLEARCUSTOMDATE,");
strSql.Append(" ISMOREGOOD = @ISMOREGOOD,");
strSql.Append(" INSPECTSERVICE = @INSPECTSERVICE,");
strSql.Append(" CUSTOMSNUM = @CUSTOMSNUM,");
strSql.Append(" TRADETERM = @TRADETERM,");
strSql.Append(" BSCUSTOMNO = @BSCUSTOMNO,");
strSql.Append(" ISPRINTPR = @ISPRINTPR,");
strSql.Append(" CUSTOMTYPE = @CUSTOMTYPE,");
strSql.Append(" ISCLEAR = @ISCLEAR,");
strSql.Append(" ISCUSTOMEND = @ISCUSTOMEND,");
strSql.Append(" CUSTOMSLNO = @CUSTOMSLNO,");
strSql.Append(" WMSNO = @WMSNO,");
strSql.Append(" ediYwlx = @ediYwlx,");
strSql.Append(" recordSn = @recordSn,");
strSql.Append(" payMent = @payMent,");
strSql.Append(" carriageType = @carriageType,");
strSql.Append(" carriagePrice = @carriagePrice,");
strSql.Append(" carriageCurrency = @carriageCurrency,");
strSql.Append(" premiumType = @premiumType,");
strSql.Append(" premiumPrice = @premiumPrice,");
strSql.Append(" premiumCurrency = @premiumCurrency,");
strSql.Append(" CNTR1 = @CNTR1,");
strSql.Append(" CNTR2 = @CNTR2,");
strSql.Append(" CNTR3 = @CNTR3,");
strSql.Append(" CNTR4 = @CNTR4,");
strSql.Append(" CNTR5 = @CNTR5,");
strSql.Append(" CNTR6 = @CNTR6,");
strSql.Append(" CNTR7 = @CNTR7,");
strSql.Append(" CNTR8 = @CNTR8,");
strSql.Append(" CNTR9 = @CNTR9,");
strSql.Append(" CNTR10 = @CNTR10,");
strSql.Append(" OTCNTR = @OTCNTR,");
strSql.Append(" TEU = @TEU,");
strSql.Append(" ISVOU = @ISVOU,");
strSql.Append(" VOUNO = @VOUNO,");
strSql.Append(" SALECORPID = @SALECORPID,");
strSql.Append(" IsService7 = @IsService7,");
strSql.Append(" IsService8 = @IsService8,");
strSql.Append(" IsServiceFee7 = @IsServiceFee7,");
strSql.Append(" IsServiceFee8 = @IsServiceFee8");
strSql.Append(" where BSNO=@BSNO and MASTERNO=@MASTERNO and CUSTNO=@CUSTNO ");
SqlParameter[] parameters = {
new SqlParameter("@BSNO", SqlDbType.VarChar,100) ,
new SqlParameter("@MASTERNO", SqlDbType.VarChar,100) ,
new SqlParameter("@CUSTNO", SqlDbType.VarChar,30) ,
new SqlParameter("@BSTYPE", SqlDbType.VarChar,12) ,
new SqlParameter("@BSSTATUS", SqlDbType.Bit,1) ,
new SqlParameter("@FEESTATUS", SqlDbType.Bit,1) ,
new SqlParameter("@BSDATE", SqlDbType.SmallDateTime) ,
new SqlParameter("@ACCDATE", SqlDbType.VarChar,7) ,
new SqlParameter("@BSSOURCE", SqlDbType.VarChar,36) ,
new SqlParameter("@BSSOURCEDETAIL", SqlDbType.VarChar,36) ,
new SqlParameter("@MBLNO", SqlDbType.VarChar,30) ,
new SqlParameter("@CUSTOMERNAME", SqlDbType.VarChar,20) ,
new SqlParameter("@CUSTOMNO", SqlDbType.VarChar,20) ,
new SqlParameter("@VESSEL", SqlDbType.VarChar,60) ,
new SqlParameter("@VOYNO", SqlDbType.VarChar,12) ,
new SqlParameter("@ETD", SqlDbType.VarChar,10) ,
new SqlParameter("@ETA", SqlDbType.VarChar,10) ,
new SqlParameter("@PORTLOAD", SqlDbType.VarChar,60) ,
new SqlParameter("@PORTDISCHARGE", SqlDbType.VarChar,60) ,
new SqlParameter("@PKGS", SqlDbType.Int,4) ,
new SqlParameter("@KINDPKGS", SqlDbType.VarChar,20) ,
new SqlParameter("@KGS", SqlDbType.Decimal,9) ,
new SqlParameter("@CBM", SqlDbType.Decimal,9) ,
new SqlParameter("@OP", SqlDbType.VarChar,10) ,
new SqlParameter("@SALE", SqlDbType.VarChar,10) ,
new SqlParameter("@INVNO", SqlDbType.VarChar,20) ,
new SqlParameter("@CONTRACTNO", SqlDbType.VarChar,100) ,
new SqlParameter("@ENTERPID", SqlDbType.VarChar,20) ,
new SqlParameter("@ENTERP", SqlDbType.VarChar,60) ,
new SqlParameter("@ARCOUNTRY", SqlDbType.VarChar,20) ,
new SqlParameter("@GOODSOURCE", SqlDbType.VarChar,60) ,
new SqlParameter("@DOCNO", SqlDbType.VarChar,20) ,
new SqlParameter("@REMARK", SqlDbType.VarChar,200) ,
new SqlParameter("@TimeMark", SqlDbType.Decimal,13) ,
new SqlParameter("@INPUTBY", SqlDbType.VarChar,10) ,
new SqlParameter("@CORPID", SqlDbType.VarChar,36) ,
new SqlParameter("@CUSTOMSER", SqlDbType.VarChar,20) ,
new SqlParameter("@NETWEIGHT", SqlDbType.Decimal,9) ,
new SqlParameter("@SALEDEPT", SqlDbType.VarChar,20) ,
new SqlParameter("@INSPECTIONNO", SqlDbType.VarChar,20) ,
new SqlParameter("@INSPECTIONDATE", SqlDbType.VarChar,10) ,
new SqlParameter("@TRADETYPE", SqlDbType.VarChar,20) ,
new SqlParameter("@BOOKNO", SqlDbType.VarChar,30) ,
new SqlParameter("@IsService1", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService2", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService3", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService4", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService5", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService6", SqlDbType.VarChar,1) ,
new SqlParameter("@CUSTOMDATE", SqlDbType.VarChar,10) ,
new SqlParameter("@BYCUSTOM", SqlDbType.VarChar,20) ,
new SqlParameter("@HBLNO", SqlDbType.VarChar,30) ,
new SqlParameter("@IsServiceFee1", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee2", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee3", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee4", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee5", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee6", SqlDbType.VarChar,1) ,
new SqlParameter("@OPDATE", SqlDbType.VarChar,10) ,
new SqlParameter("@MANIFESTSTATUS", SqlDbType.VarChar,10) ,
new SqlParameter("@IsService9", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService10", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService11", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService12", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService13", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService14", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService15", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService16", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee9", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee10", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee11", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee12", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee13", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee14", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee15", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee16", SqlDbType.VarChar,1) ,
new SqlParameter("@CLEARCUSTOMDATE", SqlDbType.DateTime) ,
new SqlParameter("@ISMOREGOOD", SqlDbType.Bit,1) ,
new SqlParameter("@INSPECTSERVICE", SqlDbType.VarChar,20) ,
new SqlParameter("@CUSTOMSNUM", SqlDbType.SmallInt,2) ,
new SqlParameter("@TRADETERM", SqlDbType.VarChar,20) ,
new SqlParameter("@BSCUSTOMNO", SqlDbType.VarChar,50) ,
new SqlParameter("@ISPRINTPR", SqlDbType.VarChar,1) ,
new SqlParameter("@CUSTOMTYPE", SqlDbType.VarChar,20) ,
new SqlParameter("@ISCLEAR", SqlDbType.VarChar,1) ,
new SqlParameter("@ISCUSTOMEND", SqlDbType.VarChar,1) ,
new SqlParameter("@CUSTOMSLNO", SqlDbType.VarChar,20) ,
new SqlParameter("@WMSNO", SqlDbType.VarChar,100) ,
new SqlParameter("@ediYwlx", SqlDbType.Int,4) ,
new SqlParameter("@recordSn", SqlDbType.VarChar,12) ,
new SqlParameter("@payMent", SqlDbType.VarChar,4) ,
new SqlParameter("@carriageType", SqlDbType.VarChar,10) ,
new SqlParameter("@carriagePrice", SqlDbType.Decimal,9) ,
new SqlParameter("@carriageCurrency", SqlDbType.VarChar,6) ,
new SqlParameter("@premiumType", SqlDbType.VarChar,10) ,
new SqlParameter("@premiumPrice", SqlDbType.Decimal,9) ,
new SqlParameter("@premiumCurrency", SqlDbType.VarChar,6) ,
new SqlParameter("@CNTR1", SqlDbType.Int,4) ,
new SqlParameter("@CNTR2", SqlDbType.Int,4) ,
new SqlParameter("@CNTR3", SqlDbType.Int,4) ,
new SqlParameter("@CNTR4", SqlDbType.Int,4) ,
new SqlParameter("@CNTR5", SqlDbType.Int,4) ,
new SqlParameter("@CNTR6", SqlDbType.Int,4) ,
new SqlParameter("@CNTR7", SqlDbType.Int,4) ,
new SqlParameter("@CNTR8", SqlDbType.Int,4) ,
new SqlParameter("@CNTR9", SqlDbType.Int,4) ,
new SqlParameter("@CNTR10", SqlDbType.Int,4) ,
new SqlParameter("@OTCNTR", SqlDbType.Int,4) ,
new SqlParameter("@TEU", SqlDbType.Int,4) ,
new SqlParameter("@ISVOU", SqlDbType.Bit,1) ,
new SqlParameter("@VOUNO", SqlDbType.VarChar,12) ,
new SqlParameter("@SALECORPID", SqlDbType.VarChar,36) ,
new SqlParameter("@IsService7", SqlDbType.VarChar,1) ,
new SqlParameter("@IsService8", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee7", SqlDbType.VarChar,1) ,
new SqlParameter("@IsServiceFee8", SqlDbType.VarChar,1)
};
parameters[0].Value = model.BSNO??(Object)DBNull.Value;
parameters[1].Value = model.MASTERNO??(Object)DBNull.Value;
parameters[2].Value = model.CUSTNO??(Object)DBNull.Value;
parameters[3].Value = model.BSTYPE??(Object)DBNull.Value;
parameters[4].Value = model.BSSTATUS;
parameters[5].Value = model.FEESTATUS;
parameters[6].Value = model.BSDATE;
parameters[7].Value = model.ACCDATE??(Object)DBNull.Value;
parameters[8].Value = model.BSSOURCE??(Object)DBNull.Value;
parameters[9].Value = model.BSSOURCEDETAIL??(Object)DBNull.Value;
parameters[10].Value = model.MBLNO??(Object)DBNull.Value;
parameters[11].Value = model.CUSTOMERNAME??(Object)DBNull.Value;
parameters[12].Value = model.CUSTOMNO??(Object)DBNull.Value;
parameters[13].Value = model.VESSEL??(Object)DBNull.Value;
parameters[14].Value = model.VOYNO??(Object)DBNull.Value;
parameters[15].Value = model.ETD??(Object)DBNull.Value;
parameters[16].Value = model.ETA??(Object)DBNull.Value;
parameters[17].Value = model.PORTLOAD??(Object)DBNull.Value;
parameters[18].Value = model.PORTDISCHARGE??(Object)DBNull.Value;
parameters[19].Value = model.PKGS??(Object)DBNull.Value;
parameters[20].Value = model.KINDPKGS??(Object)DBNull.Value;
parameters[21].Value = model.KGS??(Object)DBNull.Value;
parameters[22].Value = model.CBM??(Object)DBNull.Value;
parameters[23].Value = model.OP??(Object)DBNull.Value;
parameters[24].Value = model.SALE??(Object)DBNull.Value;
parameters[25].Value = model.INVNO??(Object)DBNull.Value;
parameters[26].Value = model.CONTRACTNO??(Object)DBNull.Value;
parameters[27].Value = model.ENTERPID??(Object)DBNull.Value;
parameters[28].Value = model.ENTERP??(Object)DBNull.Value;
parameters[29].Value = model.ARCOUNTRY??(Object)DBNull.Value;
parameters[30].Value = model.GOODSOURCE??(Object)DBNull.Value;
parameters[31].Value = model.DOCNO??(Object)DBNull.Value;
parameters[32].Value = model.REMARK??(Object)DBNull.Value;
parameters[33].Value = model.TimeMark??(Object)DBNull.Value;
parameters[34].Value = model.INPUTBY??(Object)DBNull.Value;
parameters[35].Value = model.CORPID??(Object)DBNull.Value;
parameters[36].Value = model.CUSTOMSER??(Object)DBNull.Value;
parameters[37].Value = model.NETWEIGHT??(Object)DBNull.Value;
parameters[38].Value = model.SALEDEPT??(Object)DBNull.Value;
parameters[39].Value = model.INSPECTIONNO??(Object)DBNull.Value;
parameters[40].Value = model.INSPECTIONDATE??(Object)DBNull.Value;
parameters[41].Value = model.TRADETYPE??(Object)DBNull.Value;
parameters[42].Value = model.BOOKNO??(Object)DBNull.Value;
parameters[43].Value = model.IsService1??(Object)DBNull.Value;
parameters[44].Value = model.IsService2??(Object)DBNull.Value;
parameters[45].Value = model.IsService3??(Object)DBNull.Value;
parameters[46].Value = model.IsService4??(Object)DBNull.Value;
parameters[47].Value = model.IsService5??(Object)DBNull.Value;
parameters[48].Value = model.IsService6??(Object)DBNull.Value;
parameters[49].Value = model.CUSTOMDATE??(Object)DBNull.Value;
parameters[50].Value = model.BYCUSTOM??(Object)DBNull.Value;
parameters[51].Value = model.HBLNO??(Object)DBNull.Value;
parameters[52].Value = model.IsServiceFee1??(Object)DBNull.Value;
parameters[53].Value = model.IsServiceFee2??(Object)DBNull.Value;
parameters[54].Value = model.IsServiceFee3??(Object)DBNull.Value;
parameters[55].Value = model.IsServiceFee4??(Object)DBNull.Value;
parameters[56].Value = model.IsServiceFee5??(Object)DBNull.Value;
parameters[57].Value = model.IsServiceFee6??(Object)DBNull.Value;
parameters[58].Value = model.OPDATE??(Object)DBNull.Value;
parameters[59].Value = model.MANIFESTSTATUS??(Object)DBNull.Value;
parameters[60].Value = model.IsService9??(Object)DBNull.Value;
parameters[61].Value = model.IsService10??(Object)DBNull.Value;
parameters[62].Value = model.IsService11??(Object)DBNull.Value;
parameters[63].Value = model.IsService12??(Object)DBNull.Value;
parameters[64].Value = model.IsService13??(Object)DBNull.Value;
parameters[65].Value = model.IsService14??(Object)DBNull.Value;
parameters[66].Value = model.IsService15??(Object)DBNull.Value;
parameters[67].Value = model.IsService16??(Object)DBNull.Value;
parameters[68].Value = model.IsServiceFee9??(Object)DBNull.Value;
parameters[69].Value = model.IsServiceFee10??(Object)DBNull.Value;
parameters[70].Value = model.IsServiceFee11??(Object)DBNull.Value;
parameters[71].Value = model.IsServiceFee12??(Object)DBNull.Value;
parameters[72].Value = model.IsServiceFee13??(Object)DBNull.Value;
parameters[73].Value = model.IsServiceFee14??(Object)DBNull.Value;
parameters[74].Value = model.IsServiceFee15??(Object)DBNull.Value;
parameters[75].Value = model.IsServiceFee16??(Object)DBNull.Value;
parameters[76].Value = model.CLEARCUSTOMDATE??(Object)DBNull.Value;
parameters[77].Value = model.ISMOREGOOD??(Object)DBNull.Value;
parameters[78].Value = model.INSPECTSERVICE??(Object)DBNull.Value;
parameters[79].Value = model.CUSTOMSNUM??(Object)DBNull.Value;
parameters[80].Value = model.TRADETERM??(Object)DBNull.Value;
parameters[81].Value = model.BSCUSTOMNO??(Object)DBNull.Value;
parameters[82].Value = model.ISPRINTPR??(Object)DBNull.Value;
parameters[83].Value = model.CUSTOMTYPE??(Object)DBNull.Value;
parameters[84].Value = model.ISCLEAR??(Object)DBNull.Value;
parameters[85].Value = model.ISCUSTOMEND??(Object)DBNull.Value;
parameters[86].Value = model.CUSTOMSLNO??(Object)DBNull.Value;
parameters[87].Value = model.WMSNO??(Object)DBNull.Value;
parameters[88].Value = model.ediYwlx??(Object)DBNull.Value;
parameters[89].Value = model.recordSn??(Object)DBNull.Value;
parameters[90].Value = model.payMent??(Object)DBNull.Value;
parameters[91].Value = model.carriageType??(Object)DBNull.Value;
parameters[92].Value = model.carriagePrice??(Object)DBNull.Value;
parameters[93].Value = model.carriageCurrency??(Object)DBNull.Value;
parameters[94].Value = model.premiumType??(Object)DBNull.Value;
parameters[95].Value = model.premiumPrice??(Object)DBNull.Value;
parameters[96].Value = model.premiumCurrency??(Object)DBNull.Value;
parameters[97].Value = model.CNTR1??(Object)DBNull.Value;
parameters[98].Value = model.CNTR2??(Object)DBNull.Value;
parameters[99].Value = model.CNTR3??(Object)DBNull.Value;
parameters[100].Value = model.CNTR4??(Object)DBNull.Value;
parameters[101].Value = model.CNTR5??(Object)DBNull.Value;
parameters[102].Value = model.CNTR6??(Object)DBNull.Value;
parameters[103].Value = model.CNTR7??(Object)DBNull.Value;
parameters[104].Value = model.CNTR8??(Object)DBNull.Value;
parameters[105].Value = model.CNTR9??(Object)DBNull.Value;
parameters[106].Value = model.CNTR10??(Object)DBNull.Value;
parameters[107].Value = model.OTCNTR??(Object)DBNull.Value;
parameters[108].Value = model.TEU??(Object)DBNull.Value;
parameters[109].Value = model.ISVOU??(Object)DBNull.Value;
parameters[110].Value = model.VOUNO??(Object)DBNull.Value;
parameters[111].Value = model.SALECORPID??(Object)DBNull.Value;
parameters[112].Value = model.IsService7??(Object)DBNull.Value;
parameters[113].Value = model.IsService8??(Object)DBNull.Value;
parameters[114].Value = model.IsServiceFee7??(Object)DBNull.Value;
parameters[115].Value = model.IsServiceFee8??(Object)DBNull.Value;
return DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
}
/// <summary>
/// 删除一条数据
/// </summary>
public int Delete(string BSNO,string MASTERNO,string CUSTNO)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("delete from op_apply ");
strSql.Append(" where BSNO=@BSNO and MASTERNO=@MASTERNO and CUSTNO=@CUSTNO ");
SqlParameter[] parameters = {
new SqlParameter("@BSNO", SqlDbType.VarChar,100),
new SqlParameter("@MASTERNO", SqlDbType.VarChar,100),
new SqlParameter("@CUSTNO", SqlDbType.VarChar,30) };
parameters[0].Value = BSNO;
parameters[1].Value = MASTERNO;
parameters[2].Value = CUSTNO;
return DbHelperSQL.ExecuteSql(strSql.ToString(),parameters);
}
/// <summary>
/// 按条件批量删除
/// </summary>
public int DeleteListWhere(string strWhere)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("delete from op_apply ");
if(strWhere.Trim()!="")
{
strSql.Append(" where "+strWhere);
}
return DbHelperSQL.ExecuteSql(strSql.ToString());
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public DataSet GetModel(string BSNO,string MASTERNO,string CUSTNO)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("select BSNO, MASTERNO, CUSTNO, BSTYPE, BSSTATUS, FEESTATUS, BSDATE, ACCDATE, BSSOURCE, BSSOURCEDETAIL, MBLNO, CUSTOMERNAME, CUSTOMNO, VESSEL, VOYNO, ETD, ETA, PORTLOAD, PORTDISCHARGE, PKGS, KINDPKGS, KGS, CBM, OP, SALE, INVNO, CONTRACTNO, ENTERPID, ENTERP, ARCOUNTRY, GOODSOURCE, DOCNO, REMARK, TimeMark, INPUTBY, CORPID, CUSTOMSER, NETWEIGHT, SALEDEPT, INSPECTIONNO, INSPECTIONDATE, TRADETYPE, BOOKNO, IsService1, IsService2, IsService3, IsService4, IsService5, IsService6, CUSTOMDATE, BYCUSTOM, HBLNO, IsServiceFee1, IsServiceFee2, IsServiceFee3, IsServiceFee4, IsServiceFee5, IsServiceFee6, OPDATE, MANIFESTSTATUS, IsService9, IsService10, IsService11, IsService12, IsService13, IsService14, IsService15, IsService16, IsServiceFee9, IsServiceFee10, IsServiceFee11, IsServiceFee12, IsServiceFee13, IsServiceFee14, IsServiceFee15, IsServiceFee16, CLEARCUSTOMDATE, ISMOREGOOD, INSPECTSERVICE, CUSTOMSNUM, TRADETERM, BSCUSTOMNO, ISPRINTPR, CUSTOMTYPE, ISCLEAR, ISCUSTOMEND, CUSTOMSLNO, WMSNO, ediYwlx, recordSn, payMent, carriageType, carriagePrice, carriageCurrency, premiumType, premiumPrice, premiumCurrency, CNTR1, CNTR2, CNTR3, CNTR4, CNTR5, CNTR6, CNTR7, CNTR8, CNTR9, CNTR10, OTCNTR, TEU, ISVOU, VOUNO, SALECORPID, IsService7, IsService8, IsServiceFee7, IsServiceFee8 ");
strSql.Append(" from op_apply ");
strSql.Append(" where BSNO=@BSNO and MASTERNO=@MASTERNO and CUSTNO=@CUSTNO ");
SqlParameter[] parameters = {
new SqlParameter("@BSNO", SqlDbType.VarChar,100),
new SqlParameter("@MASTERNO", SqlDbType.VarChar,100),
new SqlParameter("@CUSTNO", SqlDbType.VarChar,30) };
parameters[0].Value = BSNO;
parameters[1].Value = MASTERNO;
parameters[2].Value = CUSTNO;
DSWeb.SoftMng.Model.op_apply model=new DSWeb.SoftMng.Model.op_apply();
return DbHelperSQL.Query(strSql.ToString(),parameters);
}
/// <summary>
/// 获得数据列表
/// </summary>
public DataSet GetList(string strWhere)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("select *,(select top 1 value from sys_Enumeration where type='监管方式' and name=TRADETYPE) TRADEMODE ");
strSql.Append(" FROM op_apply ");
if(strWhere.Trim()!="")
{
strSql.Append(" where "+strWhere);
}
return DbHelperSQL.Query(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 op_apply ");
if(strWhere.Trim()!="")
{
strSql.Append(" where "+strWhere);
}
strSql.Append(" order by " + filedOrder);
return DbHelperSQL.Query(strSql.ToString());
}
/// <summary>
/// 分页获取数据列表
/// </summary>
public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
{
//动软代码
StringBuilder strSql = new StringBuilder();
strSql.Append("SELECT * FROM ( ");
strSql.Append(" SELECT ROW_NUMBER() OVER (");
if (!string.IsNullOrEmpty(orderby.Trim()))
strSql.Append("order by T." + orderby);
strSql.Append(")AS Row, T.* from op_apply T ");
if (!string.IsNullOrEmpty(strWhere.Trim()))
{
strSql.Append(" WHERE " + strWhere);
}
strSql.Append(" ) TT");
strSql.AppendFormat(" WHERE TT.Row > {0} and TT.Row <= {1}", startIndex, endIndex);
//公共代码
return DbHelperSQL.Query(strSql.ToString());
}
/// <summary>
/// 获取记录总数
/// </summary>
public int GetRecordCount(string strWhere)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("select count(1) FROM op_apply ");
if(strWhere.Trim()!="")
{
strSql.Append(" where "+strWhere);
}
return DbHelperSQL.ExcuteScalarSQL(strSql.ToString());
}
}
}