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.

3181 lines
286 KiB
C#

11 months ago
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using DSWeb.DataAccess;
using DSWeb.Models;
using System.Data.SqlClient;
using System.Collections.Generic;
namespace DSWeb.EntityDA
{
public class CrmPriceCarrierDA
{
private const string PARM_MODULE_GID = "@GID";
private const string PARM_MODULE_PORTDISCHARGE = "@PORTDISCHARGE";//卸货港
private const string PARM_MODULE_CARRIER = "@CARRIER"; //船公司
private const string PARM_MODULE_ETD = "@ETD";//开航日
private const string PARM_MODULE_TT = "@TT";//航程
private const string SQL_SELECT_INFO = "select GID,LOCKFLAG,PODLOAD,PORTDISCHARGE,DESTINATION,CARRIER,FORWARDER,ETD,TT,VIA,POC,SVC,LANE,CARRIERLANE,OWS,VALIDDATE,EFFECTIVEDATE,INPUTBY,INPUTTIME,MODIFYTIME,COMMODITY,SC,NAMEAC,SICUT,CUSCLSG,CYCLSG,[20GP0],[20GP1],[20GP2],[20GP3],[40GP0],[40GP1],[40GP2],[40GP3],[40HQ0],[40HQ1],[40HQ2],[40HQ3],[45HQ0],[45HQ1],[45HQ2],[45HQ3],MODIFIEDUSER,ISISSUE,PROFIT20GP1,PROFIT40GP1,PROFIT40HQ1,PROFIT45HQ1,OF20GP,BAF20GP,CAF20GP,PSS20GP,GRI20GP,INLAND20GP,ISPS20GP,SZ20GP,AG20GP,OF40GP,BAF40GP,CAF40GP,PSS40GP,GRI40GP,INLAND40GP,ISPS40GP,SZ40GP,AG40GP,OF40HQ,BAF40HQ,CAF40HQ,PSS40HQ,GRI40HQ,INLAND40HQ,ISPS40HQ,SZ40HQ,AG40HQ,OF45HQ,BAF45HQ,CAF45HQ,PSS45HQ,GRI45HQ,INLAND45HQ,ISPS45HQ,SZ45HQ,AG45HQ,REMARK,CARRIERCN,BOOKINGFEE,CTNFEE,THCFEE,FILEFEE,LCLCOST,LCLPRICE,CISF,REMARK2,TYPE,CORPID,[40RH0],[40RH1],[40RH2],[40RH3],PROFIT40RH1,PROFIT40RH2,PROFIT40RH3,OF40RH,BAF40RH,CAF40RH,PSS40RH,GRI40RH,INLAND40RH,ISPS40RH,SZ40RH,AG40RH,PIRICEVIAPORT,[20RS0],[20RS1],[20RS2],[20RS3],[PROFIT20RS1],[PROFIT20RS2],[PROFIT20RS3],[OF20RS],[BAF20RS],[CAF20RS],[PSS20RS],[GRI20RS],[INLAND20RS],[ISPS20RS],[SZ20RS],[AG20RS],[40NOR0],[40NOR1],[40NOR2],[40NOR3],[PROFIT40NOR1],[PROFIT40NOR2],[PROFIT40NOR3],[OF40NOR],[BAF40NOR],[CAF40NOR],[PSS40NOR],[GRI40NOR],[INLAND40NOR],[ISPS40NOR],[SZ40NOR],[AG40NOR] from crm_price_carrier where GID=@GID";
private const string SQL_SELECT_INFO_ALL = "select GID,LOCKFLAG,PODLOAD,PORTDISCHARGE,DESTINATION,CARRIER,FORWARDER,ETD,TT,VIA,POC,SVC,LANE,CARRIERLANE,OWS,VALIDDATE,EFFECTIVEDATE,INPUTBY,INPUTTIME,MODIFYTIME,COMMODITY,SC,NAMEAC,SICUT,CUSCLSG,CYCLSG,[20GP0],[20GP1],[20GP2],[20GP3],[40GP0],[40GP1],[40GP2],[40GP3],[40HQ0],[40HQ1],[40HQ2],[40HQ3],[45HQ0],[45HQ1],[45HQ2],[45HQ3],MODIFIEDUSER,ISISSUE,PROFIT20GP1,PROFIT40GP1,PROFIT40HQ1,PROFIT45HQ1,OF20GP,BAF20GP,CAF20GP,PSS20GP,GRI20GP,INLAND20GP,ISPS20GP,SZ20GP,AG20GP,OF40GP,BAF40GP,CAF40GP,PSS40GP,GRI40GP,INLAND40GP,ISPS40GP,SZ40GP,AG40GP,OF40HQ,BAF40HQ,CAF40HQ,PSS40HQ,GRI40HQ,INLAND40HQ,ISPS40HQ,SZ40HQ,AG40HQ,OF45HQ,BAF45HQ,CAF45HQ,PSS45HQ,GRI45HQ,INLAND45HQ,ISPS45HQ,SZ45HQ,AG45HQ,REMARK,CARRIERCN,BOOKINGFEE,CTNFEE,THCFEE,FILEFEE,LCLCOST,LCLPRICE,CISF,REMARK2,TYPE,CORPID,[40RH0],[40RH1],[40RH2],[40RH3],PROFIT40RH1,PROFIT40RH2,PROFIT40RH3,OF40RH,BAF40RH,CAF40RH,PSS40RH,GRI40RH,INLAND40RH,ISPS40RH,SZ40RH,AG40RH,PIRICEVIAPORT,[20RS0],[20RS1],[20RS2],[20RS3],[PROFIT20RS1],[PROFIT20RS2],[PROFIT20RS3],[OF20RS],[BAF20RS],[CAF20RS],[PSS20RS],[GRI20RS],[INLAND20RS],[ISPS20RS],[SZ20RS],[AG20RS],[40NOR0],[40NOR1],[40NOR2],[40NOR3],[PROFIT40NOR1],[PROFIT40NOR2],[PROFIT40NOR3],[OF40NOR],[BAF40NOR],[CAF40NOR],[PSS40NOR],[GRI40NOR],[INLAND40NOR],[ISPS40NOR],[SZ40NOR],[AG40NOR] from crm_price_carrier where PORTDISCHARGE=@PORTDISCHARGE and CARRIER=@CARRIER and ETD=@ETD and TT=@TT and TYPE=@TYPE";
private const string SQL_DELETE_INFO = "DELETE FROM crm_price_carrier WHERE GID=@GID";
private string SQL_INSERT_INFO = "insert into crm_price_carrier(GID,LOCKFLAG,PODLOAD,PORTDISCHARGE,DESTINATION,CARRIER,FORWARDER,ETD,TT,VIA,POC,SVC,LANE,CARRIERLANE,OWS,{0}{2}INPUTBY,COMMODITY,SC,NAMEAC,SICUT,CUSCLSG,CYCLSG,[20GP0],[20GP1],[20GP2],[20GP3],[40GP0],[40GP1],[40GP2],[40GP3],[40HQ0],[40HQ1],[40HQ2],[40HQ3],[45HQ0],[45HQ1],[45HQ2],[45HQ3],ISISSUE,PROFIT20GP1,PROFIT40GP1,PROFIT40HQ1,PROFIT45HQ1,OF20GP,BAF20GP,CAF20GP,PSS20GP,GRI20GP,INLAND20GP,ISPS20GP,SZ20GP,AG20GP,OF40GP,BAF40GP,CAF40GP,PSS40GP,GRI40GP,INLAND40GP,ISPS40GP,SZ40GP,AG40GP,OF40HQ,BAF40HQ,CAF40HQ,PSS40HQ,GRI40HQ,INLAND40HQ,ISPS40HQ,SZ40HQ,AG40HQ,OF45HQ,BAF45HQ,CAF45HQ,PSS45HQ,GRI45HQ,INLAND45HQ,ISPS45HQ,SZ45HQ,AG45HQ,REMARK,CARRIERCN,BOOKINGFEE,CTNFEE,THCFEE,FILEFEE,LCLCOST,LCLPRICE,CISF,REMARK2,TYPE,CORPID,[40RH0],[40RH1],[40RH2],[40RH3],PROFIT40RH1,PROFIT40RH2,PROFIT40RH3,OF40RH,BAF40RH,CAF40RH,PSS40RH,GRI40RH,INLAND40RH,ISPS40RH,SZ40RH,AG40RH,PIRICEVIAPORT,[20RS0],[20RS1],[20RS2],[20RS3],[PROFIT20RS1],[PROFIT20RS2],[PROFIT20RS3],[OF20RS],[BAF20RS],[CAF20RS],[PSS20RS],[GRI20RS],[INLAND20RS],[ISPS20RS],[SZ20RS],[AG20RS],[40NOR0],[40NOR1],[40NOR2],[40NOR3],[PROFIT40NOR1],[PROFIT40NOR2],[PROFIT40NOR3],[OF40NOR],[BAF40NOR],[CAF40NOR],[PSS40NOR],[GRI40NOR],[INLAND40NOR],[ISPS40NOR],[SZ40NOR],[AG40NOR]) "
+ " values(@GID,0,@PODLOAD,@PORTDISCHARGE,@DESTINATION,@CARRIER,@FORWARDER,@ETD,@TT,@VIA,@POC,@SVC,@LANE,@CARRIERLANE,@OWS,{1}{3}@INPUTBY,@COMMODITY,@SC,@NAMEAC,@SICUT,@CUSCLSG,@CYCLSG,@D_20GP0,@D_20GP1,@D_20GP2,@D_20GP3,@D_40GP0,@D_40GP1,@D_40GP2,@D_40GP3,@D_40HQ0,@D_40HQ1,@D_40HQ2,@D_40HQ3,@D_45HQ0,@D_45HQ1,@D_45HQ2,@D_45HQ3,0,@PROFIT20GP1,@PROFIT40GP1,@PROFIT40HQ1,@PROFIT45HQ1,@OF20GP,@BAF20GP,@CAF20GP,@PSS20GP,@GRI20GP,@INLAND20GP,@ISPS20GP,@SZ20GP,@AG20GP,@OF40GP,@BAF40GP,@CAF40GP,@PSS40GP,@GRI40GP,@INLAND40GP,@ISPS40GP,@SZ40GP,@AG40GP,@OF40HQ,@BAF40HQ,@CAF40HQ,@PSS40HQ,@GRI40HQ,@INLAND40HQ,@ISPS40HQ,@SZ40HQ,@AG40HQ,@OF45HQ,@BAF45HQ,@CAF45HQ,@PSS45HQ,@GRI45HQ,@INLAND45HQ,@ISPS45HQ,@SZ45HQ,@AG45HQ,@REMARK,@CARRIERCN,@BOOKINGFEE,@CTNFEE,@THCFEE,@FILEFEE,@LCLCOST,@LCLPRICE,@CISF,@REMARK2,@TYPE,@CORPID,@D_40RH0,@D_40RH1,@D_40RH2,@D_40RH3,@PROFIT40RH1,@PROFIT40RH2,@PROFIT40RH3,@OF40RH,@BAF40RH,@CAF40RH,@PSS40RH,@GRI40RH,@INLAND40RH,@ISPS40RH,@SZ40RH,@AG40RH,@PIRICEVIAPORT,@D_20RS0,@D_20RS1,@D_20RS2,@D_20RS3,@PROFIT20RS1,@PROFIT20RS2,@PROFIT20RS3,@OF20RS,@BAF20RS,@CAF20RS,@PSS20RS,@GRI20RS,@INLAND20RS,@ISPS20RS,@SZ20RS,@AG20RS,@D_40NOR0,@D_40NOR1,@D_40NOR2,@D_40NOR3,@PROFIT40NOR1,@PROFIT40NOR2,@PROFIT40NOR3,@OF40NOR,@BAF40NOR,@CAF40NOR,@PSS40NOR,@GRI40NOR,@INLAND40NOR,@ISPS40NOR,@SZ40NOR,@AG40NOR)";
private string SQL_UPDATE_INFO = "update crm_price_carrier set PODLOAD=@PODLOAD,PORTDISCHARGE=@PORTDISCHARGE,DESTINATION=@DESTINATION,CARRIER=@CARRIER,FORWARDER=@FORWARDER,ETD=@ETD,TT=@TT,VIA=@VIA,POC=@POC,SVC=@SVC,LANE=@LANE,CARRIERLANE=@CARRIERLANE,OWS=@OWS,{0}{1}{2}{3}MODIFIEDUSER=@MODIFIEDUSER,COMMODITY=@COMMODITY,SC=@SC,NAMEAC=@NAMEAC,SICUT=@SICUT,CUSCLSG=@CUSCLSG,CYCLSG=@CYCLSG,[20GP0]=@D_20GP0,[20GP1]=@D_20GP1,[20GP2]=@D_20GP2,[20GP3]=@D_20GP3,[40GP0]=@D_40GP0,[40GP1]=@D_40GP1,[40GP2]=@D_40GP2,[40GP3]=@D_40GP3,[40HQ0]=@D_40HQ0,[40HQ1]=@D_40HQ1,[40HQ2]=@D_40HQ2,[40HQ3]=@D_40HQ3,[45HQ0]=@D_45HQ0,[45HQ1]=@D_45HQ1,[45HQ2]=@D_45HQ2,[45HQ3]=@D_45HQ3,MODIFYTIME=getdate(),PROFIT20GP1=@PROFIT20GP1,PROFIT40GP1=@PROFIT40GP1,PROFIT40HQ1=@PROFIT40HQ1,PROFIT45HQ1=@PROFIT45HQ1,OF20GP=@OF20GP,BAF20GP=@BAF20GP,CAF20GP=@CAF20GP,PSS20GP=@PSS20GP,GRI20GP=@GRI20GP,INLAND20GP=@INLAND20GP,ISPS20GP=@ISPS20GP,SZ20GP=@SZ20GP,AG20GP=@AG20GP,OF40GP=@OF40GP,BAF40GP=@BAF40GP,CAF40GP=@CAF40GP,PSS40GP=@PSS40GP,GRI40GP=@GRI40GP,INLAND40GP=@INLAND40GP,ISPS40GP=@ISPS40GP,SZ40GP=@SZ40GP,AG40GP=@AG40GP,OF40HQ=@OF40HQ,BAF40HQ=@BAF40HQ,CAF40HQ=@CAF40HQ,PSS40HQ=@PSS40HQ,GRI40HQ=@GRI40HQ,INLAND40HQ=@INLAND40HQ,ISPS40HQ=@ISPS40HQ,SZ40HQ=@SZ40HQ,AG40HQ=@AG40HQ,OF45HQ=@OF45HQ,BAF45HQ=@BAF45HQ,CAF45HQ=@CAF45HQ,PSS45HQ=@PSS45HQ,GRI45HQ=@GRI45HQ,INLAND45HQ=@INLAND45HQ,ISPS45HQ=@ISPS45HQ,SZ45HQ=@SZ45HQ,AG45HQ=@AG45HQ,REMARK=@REMARK,CARRIERCN=@CARRIERCN,BOOKINGFEE=@BOOKINGFEE,CTNFEE=@CTNFEE,THCFEE=@THCFEE,FILEFEE=@FILEFEE,LCLCOST=@LCLCOST,LCLPRICE=@LCLPRICE,CISF=@CISF,REMARK2=@REMARK2,[40RH0] = @D_40RH0,[40RH1] = @D_40RH1 ,[40RH2] = @D_40RH2 ,[40RH3] = @D_40RH3 ,PROFIT40RH1 = @PROFIT40RH1 ,PROFIT40RH2 = @PROFIT40RH2 ,PROFIT40RH3 = @PROFIT40RH3 ,OF40RH = @OF40RH ,BAF40RH = @BAF40RH ,CAF40RH = @CAF40RH ,PSS40RH = @PSS40RH ,GRI40RH = @GRI40RH ,INLAND40RH = @INLAND40RH ,ISPS40RH = @ISPS40RH ,SZ40RH = @SZ40RH ,AG40RH = @AG40RH ,PIRICEVIAPORT = @PIRICEVIAPORT,[20RS0] = @D_20RS0,[20RS1] = @D_20RS1,[20RS2] = @D_20RS2,[20RS3] = @D_20RS3,PROFIT20RS1 = @PROFIT20RS1,PROFIT20RS2 = @PROFIT20RS2,PROFIT20RS3 = @PROFIT20RS3,OF20RS = @OF20RS,BAF20RS = @BAF20RS,CAF20RS = @CAF20RS,PSS20RS = @PSS20RS,GRI20RS = @GRI20RS,INLAND20RS = @INLAND20RS,ISPS20RS = @ISPS20RS,SZ20RS = @SZ20RS,AG20RS = @AG20RS,[40NOR0] = @D_40NOR0,[40NOR1] = @D_40NOR1,[40NOR2] = @D_40NOR2,[40NOR3] = @D_40NOR3,PROFIT40NOR1 = @PROFIT40NOR1,PROFIT40NOR2 = @PROFIT40NOR2,PROFIT40NOR3 = @PROFIT40NOR3,OF40NOR = @OF40NOR,BAF40NOR = @BAF40NOR,CAF40NOR = @CAF40NOR,PSS40NOR = @PSS40NOR,GRI40NOR = @GRI40NOR,INLAND40NOR = @INLAND40NOR,ISPS40NOR = @ISPS40NOR,SZ40NOR = @SZ40NOR,AG40NOR = @AG40NOR where GID=@GID ";
public CrmPriceCarrierDA()
{
}
#region 根据运价查询ORDNO获取集装箱信息
/// <summary>
/// 根据运价查询ORDNO获取集装箱信息
/// </summary>
/// <param name="strGid"></param>
/// <returns></returns>
public IList<CrmPriceCarrierEntity> GetALL(string strPORTDISCHARGE, string strCARRIER, string strETD, string strTT,string strTYPE)
{
//初始化参数并赋值
SqlParameter[] parms = new SqlParameter[]
{
new SqlParameter("@PORTDISCHARGE",SqlDbType.VarChar,60),//卸货港
new SqlParameter("@CARRIER",SqlDbType.VarChar,50),//船公司
new SqlParameter("@ETD",SqlDbType.VarChar,10),//开航日
new SqlParameter("@TT",SqlDbType.VarChar,3),//航程
new SqlParameter("@TYPE",SqlDbType.VarChar,3)//
};
parms[0].Value = strPORTDISCHARGE;//卸货港
parms[1].Value = strCARRIER;//船公司
parms[2].Value = strETD;//开航日
parms[3].Value = strTT;//航程
parms[4].Value = strTYPE;//
IList<CrmPriceCarrierEntity> CrmPriceCarrierEntities = new List<CrmPriceCarrierEntity>();
using (SqlDataReader sqlRead = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, SQL_SELECT_INFO_ALL, parms))
{
try
{
while (sqlRead.Read())
{
CrmPriceCarrierEntity CrmPriceCarrierEntity = new CrmPriceCarrierEntity();
if (!sqlRead.IsDBNull(0)) { CrmPriceCarrierEntity.GID = sqlRead.GetString(0); }// 惟一编号
if (!sqlRead.IsDBNull(1)) { CrmPriceCarrierEntity.LOCKFLAG = sqlRead.GetBoolean(1); }// 是否锁定
if (!sqlRead.IsDBNull(2)) { CrmPriceCarrierEntity.PODLOAD = sqlRead.GetString(2); }// 起运港
if (!sqlRead.IsDBNull(3)) { CrmPriceCarrierEntity.PORTDISCHARGE = sqlRead.GetString(3); }// 卸货港
if (!sqlRead.IsDBNull(4)) { CrmPriceCarrierEntity.DESTINATION = sqlRead.GetString(4); }// 目的地
if (!sqlRead.IsDBNull(5)) { CrmPriceCarrierEntity.CARRIER = sqlRead.GetString(5); }// 船公司
if (!sqlRead.IsDBNull(6)) { CrmPriceCarrierEntity.FORWARDER = sqlRead.GetString(6); }// 订舱代理
if (!sqlRead.IsDBNull(7)) { CrmPriceCarrierEntity.ETD = sqlRead.GetString(7); }// 开航日
if (!sqlRead.IsDBNull(8)) { CrmPriceCarrierEntity.TT = sqlRead.GetString(8); }// 航程
if (!sqlRead.IsDBNull(9)) { CrmPriceCarrierEntity.VIA = sqlRead.GetString(9); }// 中转港
if (!sqlRead.IsDBNull(10)) { CrmPriceCarrierEntity.POC = sqlRead.GetString(10); }// 挂靠港
if (!sqlRead.IsDBNull(11)) { CrmPriceCarrierEntity.SVC = sqlRead.GetString(11); }// 服务
if (!sqlRead.IsDBNull(12)) { CrmPriceCarrierEntity.LANE = sqlRead.GetString(12); }// 航线
if (!sqlRead.IsDBNull(13)) { CrmPriceCarrierEntity.CARRIERLANE = sqlRead.GetString(13); }// 船公司航线代码
if (!sqlRead.IsDBNull(14)) { CrmPriceCarrierEntity.OWS = sqlRead.GetString(14); }// 超重费
if (!sqlRead.IsDBNull(15)) { CrmPriceCarrierEntity.VALIDDATE = sqlRead.GetDateTime(15); }// 有效期
if (!sqlRead.IsDBNull(16)) { CrmPriceCarrierEntity.EFFECTIVEDATE = sqlRead.GetDateTime(16); }// 生效期
if (!sqlRead.IsDBNull(17)) { CrmPriceCarrierEntity.INPUTBY = sqlRead.GetString(17); }// 录入人
if (!sqlRead.IsDBNull(18)) { CrmPriceCarrierEntity.INPUTTIME = sqlRead.GetDateTime(18); }// 录入日期
if (!sqlRead.IsDBNull(19)) { CrmPriceCarrierEntity.MODIFYTIME = sqlRead.GetDateTime(19); }// 最后修改日期
if (!sqlRead.IsDBNull(20)) { CrmPriceCarrierEntity.COMMODITY = sqlRead.GetString(20); }// 品名
if (!sqlRead.IsDBNull(21)) { CrmPriceCarrierEntity.SC = sqlRead.GetString(21); }// 合约方
if (!sqlRead.IsDBNull(22)) { CrmPriceCarrierEntity.NAMEAC = sqlRead.GetString(22); }// 合约内容
if (!sqlRead.IsDBNull(23)) { CrmPriceCarrierEntity.SICUT = sqlRead.GetString(23); }// AMS时间
if (!sqlRead.IsDBNull(24)) { CrmPriceCarrierEntity.CUSCLSG = sqlRead.GetString(24); }// 截关时间
if (!sqlRead.IsDBNull(25)) { CrmPriceCarrierEntity.CYCLSG = sqlRead.GetString(25); }// 操作时间
if (!sqlRead.IsDBNull(26)) { CrmPriceCarrierEntity.D_20GP0 = sqlRead.GetDecimal(26); }// 成本价
if (!sqlRead.IsDBNull(27)) { CrmPriceCarrierEntity.D_20GP1 = sqlRead.GetDecimal(27); }// 一级售价
if (!sqlRead.IsDBNull(28)) { CrmPriceCarrierEntity.D_20GP2 = sqlRead.GetDecimal(28); }// 二级售价
if (!sqlRead.IsDBNull(29)) { CrmPriceCarrierEntity.D_20GP3 = sqlRead.GetDecimal(29); }// 三级售价
if (!sqlRead.IsDBNull(30)) { CrmPriceCarrierEntity.D_40GP0 = sqlRead.GetDecimal(30); }//
if (!sqlRead.IsDBNull(31)) { CrmPriceCarrierEntity.D_40GP1 = sqlRead.GetDecimal(31); }//
if (!sqlRead.IsDBNull(32)) { CrmPriceCarrierEntity.D_40GP2 = sqlRead.GetDecimal(32); }//
if (!sqlRead.IsDBNull(33)) { CrmPriceCarrierEntity.D_40GP3 = sqlRead.GetDecimal(33); }//
if (!sqlRead.IsDBNull(34)) { CrmPriceCarrierEntity.D_40HQ0 = sqlRead.GetDecimal(34); }//
if (!sqlRead.IsDBNull(35)) { CrmPriceCarrierEntity.D_40HQ1 = sqlRead.GetDecimal(35); }//
if (!sqlRead.IsDBNull(36)) { CrmPriceCarrierEntity.D_40HQ2 = sqlRead.GetDecimal(36); }//
if (!sqlRead.IsDBNull(37)) { CrmPriceCarrierEntity.D_40HQ3 = sqlRead.GetDecimal(37); }//
if (!sqlRead.IsDBNull(38)) { CrmPriceCarrierEntity.D_45HQ0 = sqlRead.GetDecimal(38); }//
if (!sqlRead.IsDBNull(39)) { CrmPriceCarrierEntity.D_45HQ1 = sqlRead.GetDecimal(39); }//
if (!sqlRead.IsDBNull(40)) { CrmPriceCarrierEntity.D_45HQ2 = sqlRead.GetDecimal(40); }//
if (!sqlRead.IsDBNull(41)) { CrmPriceCarrierEntity.D_45HQ3 = sqlRead.GetDecimal(41); }//
if (!sqlRead.IsDBNull(42)) { CrmPriceCarrierEntity.MODIFIEDUSER = sqlRead.GetString(42); }// 最后一次录入人
if (!sqlRead.IsDBNull(43)) { CrmPriceCarrierEntity.ISISSUE = sqlRead.GetBoolean(43); }// 是否锁定
if (!sqlRead.IsDBNull(44)) { CrmPriceCarrierEntity.PROFIT20GP1 = sqlRead.GetDecimal(44); }// OF售价
if (!sqlRead.IsDBNull(45)) { CrmPriceCarrierEntity.PROFIT40GP1 = sqlRead.GetDecimal(45); }// BAF售价
if (!sqlRead.IsDBNull(46)) { CrmPriceCarrierEntity.PROFIT40HQ1 = sqlRead.GetDecimal(46); }// CAF售价
if (!sqlRead.IsDBNull(47)) { CrmPriceCarrierEntity.PROFIT45HQ1 = sqlRead.GetDecimal(47); }// PSS售价
if (!sqlRead.IsDBNull(48)) { CrmPriceCarrierEntity.OF20GP = sqlRead.GetDecimal(48); }// OF售价
if (!sqlRead.IsDBNull(49)) { CrmPriceCarrierEntity.BAF20GP = sqlRead.GetDecimal(49); }// BAF售价
if (!sqlRead.IsDBNull(50)) { CrmPriceCarrierEntity.CAF20GP = sqlRead.GetDecimal(50); }// CAF售价
if (!sqlRead.IsDBNull(51)) { CrmPriceCarrierEntity.PSS20GP = sqlRead.GetDecimal(51); }// PSS售价
if (!sqlRead.IsDBNull(52)) { CrmPriceCarrierEntity.GRI20GP = sqlRead.GetDecimal(52); }// GRI售价
if (!sqlRead.IsDBNull(53)) { CrmPriceCarrierEntity.INLAND20GP = sqlRead.GetDecimal(53); }// INLAND售价
if (!sqlRead.IsDBNull(54)) { CrmPriceCarrierEntity.ISPS20GP = sqlRead.GetDecimal(54); }// ISPS售价
if (!sqlRead.IsDBNull(55)) { CrmPriceCarrierEntity.SZ20GP = sqlRead.GetDecimal(55); }// SZ售价
if (!sqlRead.IsDBNull(56)) { CrmPriceCarrierEntity.AG20GP = sqlRead.GetDecimal(56); }// AG售价
if (!sqlRead.IsDBNull(57)) { CrmPriceCarrierEntity.OF40GP = sqlRead.GetDecimal(57); }// OF售价
if (!sqlRead.IsDBNull(58)) { CrmPriceCarrierEntity.BAF40GP = sqlRead.GetDecimal(58); }// BAF售价
if (!sqlRead.IsDBNull(59)) { CrmPriceCarrierEntity.CAF40GP = sqlRead.GetDecimal(59); }// CAF售价
if (!sqlRead.IsDBNull(60)) { CrmPriceCarrierEntity.PSS40GP = sqlRead.GetDecimal(60); }// PSS售价
if (!sqlRead.IsDBNull(61)) { CrmPriceCarrierEntity.GRI40GP = sqlRead.GetDecimal(61); }// GRI售价
if (!sqlRead.IsDBNull(62)) { CrmPriceCarrierEntity.INLAND40GP = sqlRead.GetDecimal(62); }// INLAND售价
if (!sqlRead.IsDBNull(63)) { CrmPriceCarrierEntity.ISPS40GP = sqlRead.GetDecimal(63); }// ISPS售价
if (!sqlRead.IsDBNull(64)) { CrmPriceCarrierEntity.SZ40GP = sqlRead.GetDecimal(64); }// SZ售价
if (!sqlRead.IsDBNull(65)) { CrmPriceCarrierEntity.AG40GP = sqlRead.GetDecimal(65); }// AG售价
if (!sqlRead.IsDBNull(66)) { CrmPriceCarrierEntity.OF40HQ = sqlRead.GetDecimal(66); }// OF售价
if (!sqlRead.IsDBNull(67)) { CrmPriceCarrierEntity.BAF40HQ = sqlRead.GetDecimal(67); }// BAF售价
if (!sqlRead.IsDBNull(68)) { CrmPriceCarrierEntity.CAF40HQ = sqlRead.GetDecimal(68); }// CAF售价
if (!sqlRead.IsDBNull(69)) { CrmPriceCarrierEntity.PSS40HQ = sqlRead.GetDecimal(69); }// PSS售价
if (!sqlRead.IsDBNull(70)) { CrmPriceCarrierEntity.GRI40HQ = sqlRead.GetDecimal(70); }// GRI售价
if (!sqlRead.IsDBNull(71)) { CrmPriceCarrierEntity.INLAND40HQ = sqlRead.GetDecimal(71); }// INLAND售价
if (!sqlRead.IsDBNull(72)) { CrmPriceCarrierEntity.ISPS40HQ = sqlRead.GetDecimal(72); }// ISPS售价
if (!sqlRead.IsDBNull(73)) { CrmPriceCarrierEntity.SZ40HQ = sqlRead.GetDecimal(73); }// SZ售价
if (!sqlRead.IsDBNull(74)) { CrmPriceCarrierEntity.AG40HQ = sqlRead.GetDecimal(74); }// AG售价
if (!sqlRead.IsDBNull(75)) { CrmPriceCarrierEntity.OF45HQ = sqlRead.GetDecimal(75); }// OF售价
if (!sqlRead.IsDBNull(76)) { CrmPriceCarrierEntity.BAF45HQ = sqlRead.GetDecimal(76); }// BAF售价
if (!sqlRead.IsDBNull(77)) { CrmPriceCarrierEntity.CAF45HQ = sqlRead.GetDecimal(77); }// CAF售价
if (!sqlRead.IsDBNull(78)) { CrmPriceCarrierEntity.PSS45HQ = sqlRead.GetDecimal(78); }// PSS售价
if (!sqlRead.IsDBNull(79)) { CrmPriceCarrierEntity.GRI45HQ = sqlRead.GetDecimal(79); }// GRI售价
if (!sqlRead.IsDBNull(80)) { CrmPriceCarrierEntity.INLAND45HQ = sqlRead.GetDecimal(80); }// INLAND售价
if (!sqlRead.IsDBNull(81)) { CrmPriceCarrierEntity.ISPS45HQ = sqlRead.GetDecimal(81); }// ISPS售价
if (!sqlRead.IsDBNull(82)) { CrmPriceCarrierEntity.SZ45HQ = sqlRead.GetDecimal(82); }// SZ售价
if (!sqlRead.IsDBNull(83)) { CrmPriceCarrierEntity.AG45HQ = sqlRead.GetDecimal(83); }// AG售价
if (!sqlRead.IsDBNull(84)) { CrmPriceCarrierEntity.REMARK = sqlRead.GetString(84); }// 备注
if (!sqlRead.IsDBNull(85)) { CrmPriceCarrierEntity.CARRIERCN = sqlRead.GetString(85); }//
if (!sqlRead.IsDBNull(86)) { CrmPriceCarrierEntity.BOOKINGFEE = sqlRead.GetString(86); }//
if (!sqlRead.IsDBNull(87)) { CrmPriceCarrierEntity.CTNFEE = sqlRead.GetString(87); }//
if (!sqlRead.IsDBNull(88)) { CrmPriceCarrierEntity.THCFEE = sqlRead.GetString(88); }//
if (!sqlRead.IsDBNull(89)) { CrmPriceCarrierEntity.FILEFEE = sqlRead.GetString(89); }//
if (!sqlRead.IsDBNull(90)) { CrmPriceCarrierEntity.LCLCOST = sqlRead.GetString(90); }//
if (!sqlRead.IsDBNull(91)) { CrmPriceCarrierEntity.LCLPRICE = sqlRead.GetString(91); }//
if (!sqlRead.IsDBNull(92)) { CrmPriceCarrierEntity.CISF = sqlRead.GetString(92); }//
if (!sqlRead.IsDBNull(93)) { CrmPriceCarrierEntity.REMARK2 = sqlRead.GetString(93); }//
if (!sqlRead.IsDBNull(94)) { CrmPriceCarrierEntity.TYPE = sqlRead.GetString(94); }//
if (!sqlRead.IsDBNull(95)) { CrmPriceCarrierEntity.CORPID = sqlRead.GetString(95); }//
if (!sqlRead.IsDBNull(96)) { CrmPriceCarrierEntity.D_40RH0 = sqlRead.GetDecimal(96); }
if (!sqlRead.IsDBNull(97)) { CrmPriceCarrierEntity.D_40RH1 = sqlRead.GetDecimal(97); }
if (!sqlRead.IsDBNull(98)) { CrmPriceCarrierEntity.D_40RH2 = sqlRead.GetDecimal(98); }
if (!sqlRead.IsDBNull(99)) { CrmPriceCarrierEntity.D_40RH3 = sqlRead.GetDecimal(99); }
if (!sqlRead.IsDBNull(100)) { CrmPriceCarrierEntity.PROFIT40RH1 = sqlRead.GetDecimal(100); }
if (!sqlRead.IsDBNull(101)) { CrmPriceCarrierEntity.PROFIT40RH2 = sqlRead.GetDecimal(101); }
if (!sqlRead.IsDBNull(102)) { CrmPriceCarrierEntity.PROFIT40RH3 = sqlRead.GetDecimal(102); }
if (!sqlRead.IsDBNull(103)) { CrmPriceCarrierEntity.OF40RH = sqlRead.GetDecimal(103); }
if (!sqlRead.IsDBNull(104)) { CrmPriceCarrierEntity.BAF40RH = sqlRead.GetDecimal(104); }
if (!sqlRead.IsDBNull(105)) { CrmPriceCarrierEntity.CAF40RH = sqlRead.GetDecimal(105); }
if (!sqlRead.IsDBNull(106)) { CrmPriceCarrierEntity.PSS40RH = sqlRead.GetDecimal(106); }
if (!sqlRead.IsDBNull(107)) { CrmPriceCarrierEntity.GRI40RH = sqlRead.GetDecimal(107); }
if (!sqlRead.IsDBNull(108)) { CrmPriceCarrierEntity.INLAND40RH = sqlRead.GetDecimal(108); }
if (!sqlRead.IsDBNull(109)) { CrmPriceCarrierEntity.ISPS40RH = sqlRead.GetDecimal(109); }
if (!sqlRead.IsDBNull(110)) { CrmPriceCarrierEntity.SZ40RH = sqlRead.GetDecimal(110); }
if (!sqlRead.IsDBNull(111)) { CrmPriceCarrierEntity.AG40RH = sqlRead.GetDecimal(111); }
if (!sqlRead.IsDBNull(112)) { CrmPriceCarrierEntity.PIRICEVIAPORT = sqlRead.GetString(112); }
if (!sqlRead.IsDBNull(113)) { CrmPriceCarrierEntity.D_20RS0 = sqlRead.GetDecimal(113); }
if (!sqlRead.IsDBNull(114)) { CrmPriceCarrierEntity.D_20RS1 = sqlRead.GetDecimal(114); }
if (!sqlRead.IsDBNull(115)) { CrmPriceCarrierEntity.D_20RS2 = sqlRead.GetDecimal(115); }
if (!sqlRead.IsDBNull(116)) { CrmPriceCarrierEntity.D_20RS3 = sqlRead.GetDecimal(116); }
if (!sqlRead.IsDBNull(117)) { CrmPriceCarrierEntity.PROFIT20RS1 = sqlRead.GetDecimal(117); }
if (!sqlRead.IsDBNull(118)) { CrmPriceCarrierEntity.PROFIT20RS2 = sqlRead.GetDecimal(118); }
if (!sqlRead.IsDBNull(119)) { CrmPriceCarrierEntity.PROFIT20RS3 = sqlRead.GetDecimal(119); }
if (!sqlRead.IsDBNull(120)) { CrmPriceCarrierEntity.OF20RS = sqlRead.GetDecimal(120); }
if (!sqlRead.IsDBNull(121)) { CrmPriceCarrierEntity.BAF20RS = sqlRead.GetDecimal(121); }
if (!sqlRead.IsDBNull(122)) { CrmPriceCarrierEntity.CAF20RS = sqlRead.GetDecimal(122); }
if (!sqlRead.IsDBNull(123)) { CrmPriceCarrierEntity.PSS20RS = sqlRead.GetDecimal(123); }
if (!sqlRead.IsDBNull(124)) { CrmPriceCarrierEntity.GRI20RS = sqlRead.GetDecimal(124); }
if (!sqlRead.IsDBNull(125)) { CrmPriceCarrierEntity.INLAND20RS = sqlRead.GetDecimal(125); }
if (!sqlRead.IsDBNull(126)) { CrmPriceCarrierEntity.ISPS20RS = sqlRead.GetDecimal(126); }
if (!sqlRead.IsDBNull(127)) { CrmPriceCarrierEntity.SZ20RS = sqlRead.GetDecimal(127); }
if (!sqlRead.IsDBNull(128)) { CrmPriceCarrierEntity.AG20RS = sqlRead.GetDecimal(128); }
if (!sqlRead.IsDBNull(129)) { CrmPriceCarrierEntity.D_40NOR0 = sqlRead.GetDecimal(129); }
if (!sqlRead.IsDBNull(130)) { CrmPriceCarrierEntity.D_40NOR1 = sqlRead.GetDecimal(130); }
if (!sqlRead.IsDBNull(131)) { CrmPriceCarrierEntity.D_40NOR2 = sqlRead.GetDecimal(131); }
if (!sqlRead.IsDBNull(132)) { CrmPriceCarrierEntity.D_40NOR3 = sqlRead.GetDecimal(132); }
if (!sqlRead.IsDBNull(133)) { CrmPriceCarrierEntity.PROFIT40NOR1 = sqlRead.GetDecimal(133); }
if (!sqlRead.IsDBNull(134)) { CrmPriceCarrierEntity.PROFIT40NOR2 = sqlRead.GetDecimal(134); }
if (!sqlRead.IsDBNull(135)) { CrmPriceCarrierEntity.PROFIT40NOR3 = sqlRead.GetDecimal(135); }
if (!sqlRead.IsDBNull(136)) { CrmPriceCarrierEntity.OF40NOR = sqlRead.GetDecimal(136); }
if (!sqlRead.IsDBNull(137)) { CrmPriceCarrierEntity.BAF40NOR = sqlRead.GetDecimal(137); }
if (!sqlRead.IsDBNull(138)) { CrmPriceCarrierEntity.CAF40NOR = sqlRead.GetDecimal(138); }
if (!sqlRead.IsDBNull(139)) { CrmPriceCarrierEntity.PSS40NOR = sqlRead.GetDecimal(139); }
if (!sqlRead.IsDBNull(140)) { CrmPriceCarrierEntity.GRI40NOR = sqlRead.GetDecimal(140); }
if (!sqlRead.IsDBNull(141)) { CrmPriceCarrierEntity.INLAND40NOR = sqlRead.GetDecimal(141); }
if (!sqlRead.IsDBNull(142)) { CrmPriceCarrierEntity.ISPS40NOR = sqlRead.GetDecimal(142); }
if (!sqlRead.IsDBNull(143)) { CrmPriceCarrierEntity.SZ40NOR = sqlRead.GetDecimal(143); }
if (!sqlRead.IsDBNull(144)) { CrmPriceCarrierEntity.AG40NOR = sqlRead.GetDecimal(144); }
CrmPriceCarrierEntities.Add(CrmPriceCarrierEntity);
}
}
catch (Exception execError)
{
throw execError;
}
}
return CrmPriceCarrierEntities;
}
#endregion
#region 根据GID获取信息
/// <summary>
/// 根据GID获取信息
/// </summary>
/// <param name="strRoleGID"></param>
/// <returns></returns>
public CrmPriceCarrierEntity GetID(string strGID)
{
//初始化返回变量
CrmPriceCarrierEntity CrmPriceCarrierEntity = null;
//初始化参数并赋值
SqlParameter parm = new SqlParameter(PARM_MODULE_GID, SqlDbType.VarChar, 100);
parm.Value = strGID;
using (SqlDataReader sqlRead = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, SQL_SELECT_INFO, parm))
{
try
{
CrmPriceCarrierEntity = new CrmPriceCarrierEntity();
//读取字段值
while (sqlRead.Read())
{
if (!sqlRead.IsDBNull(0)) { CrmPriceCarrierEntity.GID = sqlRead.GetString(0); }// 惟一编号
if (!sqlRead.IsDBNull(1)) { CrmPriceCarrierEntity.LOCKFLAG = sqlRead.GetBoolean(1); }// 是否锁定
if (!sqlRead.IsDBNull(2)) { CrmPriceCarrierEntity.PODLOAD = sqlRead.GetString(2); }// 起运港
if (!sqlRead.IsDBNull(3)) { CrmPriceCarrierEntity.PORTDISCHARGE = sqlRead.GetString(3); }// 卸货港
if (!sqlRead.IsDBNull(4)) { CrmPriceCarrierEntity.DESTINATION = sqlRead.GetString(4); }// 目的地
if (!sqlRead.IsDBNull(5)) { CrmPriceCarrierEntity.CARRIER = sqlRead.GetString(5); }// 船公司
if (!sqlRead.IsDBNull(6)) { CrmPriceCarrierEntity.FORWARDER = sqlRead.GetString(6); }// 订舱代理
if (!sqlRead.IsDBNull(7)) { CrmPriceCarrierEntity.ETD = sqlRead.GetString(7); }// 开航日
if (!sqlRead.IsDBNull(8)) { CrmPriceCarrierEntity.TT = sqlRead.GetString(8); }// 航程
if (!sqlRead.IsDBNull(9)) { CrmPriceCarrierEntity.VIA = sqlRead.GetString(9); }// 中转港
if (!sqlRead.IsDBNull(10)) { CrmPriceCarrierEntity.POC = sqlRead.GetString(10); }// 挂靠港
if (!sqlRead.IsDBNull(11)) { CrmPriceCarrierEntity.SVC = sqlRead.GetString(11); }// 服务
if (!sqlRead.IsDBNull(12)) { CrmPriceCarrierEntity.LANE = sqlRead.GetString(12); }// 航线
if (!sqlRead.IsDBNull(13)) { CrmPriceCarrierEntity.CARRIERLANE = sqlRead.GetString(13); }// 船公司航线代码
if (!sqlRead.IsDBNull(14)) { CrmPriceCarrierEntity.OWS = sqlRead.GetString(14); }// 超重费
if (!sqlRead.IsDBNull(15)) { CrmPriceCarrierEntity.VALIDDATE = sqlRead.GetDateTime(15); }// 有效期
if (!sqlRead.IsDBNull(16)) { CrmPriceCarrierEntity.EFFECTIVEDATE = sqlRead.GetDateTime(16); }// 生效期
if (!sqlRead.IsDBNull(17)) { CrmPriceCarrierEntity.INPUTBY = sqlRead.GetString(17); }// 录入人
if (!sqlRead.IsDBNull(18)) { CrmPriceCarrierEntity.INPUTTIME = sqlRead.GetDateTime(18); }// 录入日期
if (!sqlRead.IsDBNull(19)) { CrmPriceCarrierEntity.MODIFYTIME = sqlRead.GetDateTime(19); }// 最后修改日期
if (!sqlRead.IsDBNull(20)) { CrmPriceCarrierEntity.COMMODITY = sqlRead.GetString(20); }// 品名
if (!sqlRead.IsDBNull(21)) { CrmPriceCarrierEntity.SC = sqlRead.GetString(21); }// 合约方
if (!sqlRead.IsDBNull(22)) { CrmPriceCarrierEntity.NAMEAC = sqlRead.GetString(22); }// 合约内容
if (!sqlRead.IsDBNull(23)) { CrmPriceCarrierEntity.SICUT = sqlRead.GetString(23); }// AMS时间
if (!sqlRead.IsDBNull(24)) { CrmPriceCarrierEntity.CUSCLSG = sqlRead.GetString(24); }// 截关时间
if (!sqlRead.IsDBNull(25)) { CrmPriceCarrierEntity.CYCLSG = sqlRead.GetString(25); }// 操作时间
if (!sqlRead.IsDBNull(26)) { CrmPriceCarrierEntity.D_20GP0 = sqlRead.GetDecimal(26); }// 成本价
if (!sqlRead.IsDBNull(27)) { CrmPriceCarrierEntity.D_20GP1 = sqlRead.GetDecimal(27); }// 一级售价
if (!sqlRead.IsDBNull(28)) { CrmPriceCarrierEntity.D_20GP2 = sqlRead.GetDecimal(28); }// 二级售价
if (!sqlRead.IsDBNull(29)) { CrmPriceCarrierEntity.D_20GP3 = sqlRead.GetDecimal(29); }// 三级售价
if (!sqlRead.IsDBNull(30)) { CrmPriceCarrierEntity.D_40GP0 = sqlRead.GetDecimal(30); }//
if (!sqlRead.IsDBNull(31)) { CrmPriceCarrierEntity.D_40GP1 = sqlRead.GetDecimal(31); }//
if (!sqlRead.IsDBNull(32)) { CrmPriceCarrierEntity.D_40GP2 = sqlRead.GetDecimal(32); }//
if (!sqlRead.IsDBNull(33)) { CrmPriceCarrierEntity.D_40GP3 = sqlRead.GetDecimal(33); }//
if (!sqlRead.IsDBNull(34)) { CrmPriceCarrierEntity.D_40HQ0 = sqlRead.GetDecimal(34); }//
if (!sqlRead.IsDBNull(35)) { CrmPriceCarrierEntity.D_40HQ1 = sqlRead.GetDecimal(35); }//
if (!sqlRead.IsDBNull(36)) { CrmPriceCarrierEntity.D_40HQ2 = sqlRead.GetDecimal(36); }//
if (!sqlRead.IsDBNull(37)) { CrmPriceCarrierEntity.D_40HQ3 = sqlRead.GetDecimal(37); }//
if (!sqlRead.IsDBNull(38)) { CrmPriceCarrierEntity.D_45HQ0 = sqlRead.GetDecimal(38); }//
if (!sqlRead.IsDBNull(39)) { CrmPriceCarrierEntity.D_45HQ1 = sqlRead.GetDecimal(39); }//
if (!sqlRead.IsDBNull(40)) { CrmPriceCarrierEntity.D_45HQ2 = sqlRead.GetDecimal(40); }//
if (!sqlRead.IsDBNull(41)) { CrmPriceCarrierEntity.D_45HQ3 = sqlRead.GetDecimal(41); }//
if (!sqlRead.IsDBNull(42)) { CrmPriceCarrierEntity.MODIFIEDUSER = sqlRead.GetString(42); }// 最后一次录入人
if (!sqlRead.IsDBNull(43)) { CrmPriceCarrierEntity.ISISSUE = sqlRead.GetBoolean(43); }// 是否锁定
if (!sqlRead.IsDBNull(44)) { CrmPriceCarrierEntity.PROFIT20GP1 = sqlRead.GetDecimal(44); }// OF售价
if (!sqlRead.IsDBNull(45)) { CrmPriceCarrierEntity.PROFIT40GP1 = sqlRead.GetDecimal(45); }// BAF售价
if (!sqlRead.IsDBNull(46)) { CrmPriceCarrierEntity.PROFIT40HQ1 = sqlRead.GetDecimal(46); }// CAF售价
if (!sqlRead.IsDBNull(47)) { CrmPriceCarrierEntity.PROFIT45HQ1 = sqlRead.GetDecimal(47); }// PSS售价
if (!sqlRead.IsDBNull(48)) { CrmPriceCarrierEntity.OF20GP = sqlRead.GetDecimal(48); }// OF售价
if (!sqlRead.IsDBNull(49)) { CrmPriceCarrierEntity.BAF20GP = sqlRead.GetDecimal(49); }// BAF售价
if (!sqlRead.IsDBNull(50)) { CrmPriceCarrierEntity.CAF20GP = sqlRead.GetDecimal(50); }// CAF售价
if (!sqlRead.IsDBNull(51)) { CrmPriceCarrierEntity.PSS20GP = sqlRead.GetDecimal(51); }// PSS售价
if (!sqlRead.IsDBNull(52)) { CrmPriceCarrierEntity.GRI20GP = sqlRead.GetDecimal(52); }// GRI售价
if (!sqlRead.IsDBNull(53)) { CrmPriceCarrierEntity.INLAND20GP = sqlRead.GetDecimal(53); }// INLAND售价
if (!sqlRead.IsDBNull(54)) { CrmPriceCarrierEntity.ISPS20GP = sqlRead.GetDecimal(54); }// ISPS售价
if (!sqlRead.IsDBNull(55)) { CrmPriceCarrierEntity.SZ20GP = sqlRead.GetDecimal(55); }// SZ售价
if (!sqlRead.IsDBNull(56)) { CrmPriceCarrierEntity.AG20GP = sqlRead.GetDecimal(56); }// AG售价
if (!sqlRead.IsDBNull(57)) { CrmPriceCarrierEntity.OF40GP = sqlRead.GetDecimal(57); }// OF售价
if (!sqlRead.IsDBNull(58)) { CrmPriceCarrierEntity.BAF40GP = sqlRead.GetDecimal(58); }// BAF售价
if (!sqlRead.IsDBNull(59)) { CrmPriceCarrierEntity.CAF40GP = sqlRead.GetDecimal(59); }// CAF售价
if (!sqlRead.IsDBNull(60)) { CrmPriceCarrierEntity.PSS40GP = sqlRead.GetDecimal(60); }// PSS售价
if (!sqlRead.IsDBNull(61)) { CrmPriceCarrierEntity.GRI40GP = sqlRead.GetDecimal(61); }// GRI售价
if (!sqlRead.IsDBNull(62)) { CrmPriceCarrierEntity.INLAND40GP = sqlRead.GetDecimal(62); }// INLAND售价
if (!sqlRead.IsDBNull(63)) { CrmPriceCarrierEntity.ISPS40GP = sqlRead.GetDecimal(63); }// ISPS售价
if (!sqlRead.IsDBNull(64)) { CrmPriceCarrierEntity.SZ40GP = sqlRead.GetDecimal(64); }// SZ售价
if (!sqlRead.IsDBNull(65)) { CrmPriceCarrierEntity.AG40GP = sqlRead.GetDecimal(65); }// AG售价
if (!sqlRead.IsDBNull(66)) { CrmPriceCarrierEntity.OF40HQ = sqlRead.GetDecimal(66); }// OF售价
if (!sqlRead.IsDBNull(67)) { CrmPriceCarrierEntity.BAF40HQ = sqlRead.GetDecimal(67); }// BAF售价
if (!sqlRead.IsDBNull(68)) { CrmPriceCarrierEntity.CAF40HQ = sqlRead.GetDecimal(68); }// CAF售价
if (!sqlRead.IsDBNull(69)) { CrmPriceCarrierEntity.PSS40HQ = sqlRead.GetDecimal(69); }// PSS售价
if (!sqlRead.IsDBNull(70)) { CrmPriceCarrierEntity.GRI40HQ = sqlRead.GetDecimal(70); }// GRI售价
if (!sqlRead.IsDBNull(71)) { CrmPriceCarrierEntity.INLAND40HQ = sqlRead.GetDecimal(71); }// INLAND售价
if (!sqlRead.IsDBNull(72)) { CrmPriceCarrierEntity.ISPS40HQ = sqlRead.GetDecimal(72); }// ISPS售价
if (!sqlRead.IsDBNull(73)) { CrmPriceCarrierEntity.SZ40HQ = sqlRead.GetDecimal(73); }// SZ售价
if (!sqlRead.IsDBNull(74)) { CrmPriceCarrierEntity.AG40HQ = sqlRead.GetDecimal(74); }// AG售价
if (!sqlRead.IsDBNull(75)) { CrmPriceCarrierEntity.OF45HQ = sqlRead.GetDecimal(75); }// OF售价
if (!sqlRead.IsDBNull(76)) { CrmPriceCarrierEntity.BAF45HQ = sqlRead.GetDecimal(76); }// BAF售价
if (!sqlRead.IsDBNull(77)) { CrmPriceCarrierEntity.CAF45HQ = sqlRead.GetDecimal(77); }// CAF售价
if (!sqlRead.IsDBNull(78)) { CrmPriceCarrierEntity.PSS45HQ = sqlRead.GetDecimal(78); }// PSS售价
if (!sqlRead.IsDBNull(79)) { CrmPriceCarrierEntity.GRI45HQ = sqlRead.GetDecimal(79); }// GRI售价
if (!sqlRead.IsDBNull(80)) { CrmPriceCarrierEntity.INLAND45HQ = sqlRead.GetDecimal(80); }// INLAND售价
if (!sqlRead.IsDBNull(81)) { CrmPriceCarrierEntity.ISPS45HQ = sqlRead.GetDecimal(81); }// ISPS售价
if (!sqlRead.IsDBNull(82)) { CrmPriceCarrierEntity.SZ45HQ = sqlRead.GetDecimal(82); }// SZ售价
if (!sqlRead.IsDBNull(83)) { CrmPriceCarrierEntity.AG45HQ = sqlRead.GetDecimal(83); }// AG售价
if (!sqlRead.IsDBNull(84)) { CrmPriceCarrierEntity.REMARK = sqlRead.GetString(84); }// 备注
if (!sqlRead.IsDBNull(85)) { CrmPriceCarrierEntity.CARRIERCN = sqlRead.GetString(85); }//
if (!sqlRead.IsDBNull(86)) { CrmPriceCarrierEntity.BOOKINGFEE = sqlRead.GetString(86); }//
if (!sqlRead.IsDBNull(87)) { CrmPriceCarrierEntity.CTNFEE = sqlRead.GetString(87); }//
if (!sqlRead.IsDBNull(88)) { CrmPriceCarrierEntity.THCFEE = sqlRead.GetString(88); }//
if (!sqlRead.IsDBNull(89)) { CrmPriceCarrierEntity.FILEFEE = sqlRead.GetString(89); }//
if (!sqlRead.IsDBNull(90)) { CrmPriceCarrierEntity.LCLCOST = sqlRead.GetString(90); }//
if (!sqlRead.IsDBNull(91)) { CrmPriceCarrierEntity.LCLPRICE = sqlRead.GetString(91); }//
if (!sqlRead.IsDBNull(92)) { CrmPriceCarrierEntity.CISF = sqlRead.GetString(92); }//
if (!sqlRead.IsDBNull(93)) { CrmPriceCarrierEntity.REMARK2 = sqlRead.GetString(93); }//
if (!sqlRead.IsDBNull(94)) { CrmPriceCarrierEntity.TYPE = sqlRead.GetString(94); }//
if (!sqlRead.IsDBNull(95)) { CrmPriceCarrierEntity.CORPID = sqlRead.GetString(95); }//
if (!sqlRead.IsDBNull(96)) { CrmPriceCarrierEntity.D_40RH0 = sqlRead.GetDecimal(96); }
if (!sqlRead.IsDBNull(97)) { CrmPriceCarrierEntity.D_40RH1 = sqlRead.GetDecimal(97); }
if (!sqlRead.IsDBNull(98)) { CrmPriceCarrierEntity.D_40RH2 = sqlRead.GetDecimal(98); }
if (!sqlRead.IsDBNull(99)) { CrmPriceCarrierEntity.D_40RH3 = sqlRead.GetDecimal(99); }
if (!sqlRead.IsDBNull(100)) { CrmPriceCarrierEntity.PROFIT40RH1 = sqlRead.GetDecimal(100); }
if (!sqlRead.IsDBNull(101)) { CrmPriceCarrierEntity.PROFIT40RH2 = sqlRead.GetDecimal(101); }
if (!sqlRead.IsDBNull(102)) { CrmPriceCarrierEntity.PROFIT40RH3 = sqlRead.GetDecimal(102); }
if (!sqlRead.IsDBNull(103)) { CrmPriceCarrierEntity.OF40RH = sqlRead.GetDecimal(103); }
if (!sqlRead.IsDBNull(104)) { CrmPriceCarrierEntity.BAF40RH = sqlRead.GetDecimal(104); }
if (!sqlRead.IsDBNull(105)) { CrmPriceCarrierEntity.CAF40RH = sqlRead.GetDecimal(105); }
if (!sqlRead.IsDBNull(106)) { CrmPriceCarrierEntity.PSS40RH = sqlRead.GetDecimal(106); }
if (!sqlRead.IsDBNull(107)) { CrmPriceCarrierEntity.GRI40RH = sqlRead.GetDecimal(107); }
if (!sqlRead.IsDBNull(108)) { CrmPriceCarrierEntity.INLAND40RH = sqlRead.GetDecimal(108); }
if (!sqlRead.IsDBNull(109)) { CrmPriceCarrierEntity.ISPS40RH = sqlRead.GetDecimal(109); }
if (!sqlRead.IsDBNull(110)) { CrmPriceCarrierEntity.SZ40RH = sqlRead.GetDecimal(110); }
if (!sqlRead.IsDBNull(111)) { CrmPriceCarrierEntity.AG40RH = sqlRead.GetDecimal(111); }
if (!sqlRead.IsDBNull(112)) { CrmPriceCarrierEntity.PIRICEVIAPORT = sqlRead.GetString(112); }
if (!sqlRead.IsDBNull(113)) { CrmPriceCarrierEntity.D_20RS0 = sqlRead.GetDecimal(113); }
if (!sqlRead.IsDBNull(114)) { CrmPriceCarrierEntity.D_20RS1 = sqlRead.GetDecimal(114); }
if (!sqlRead.IsDBNull(115)) { CrmPriceCarrierEntity.D_20RS2 = sqlRead.GetDecimal(115); }
if (!sqlRead.IsDBNull(116)) { CrmPriceCarrierEntity.D_20RS3 = sqlRead.GetDecimal(116); }
if (!sqlRead.IsDBNull(117)) { CrmPriceCarrierEntity.PROFIT20RS1 = sqlRead.GetDecimal(117); }
if (!sqlRead.IsDBNull(118)) { CrmPriceCarrierEntity.PROFIT20RS2 = sqlRead.GetDecimal(118); }
if (!sqlRead.IsDBNull(119)) { CrmPriceCarrierEntity.PROFIT20RS3 = sqlRead.GetDecimal(119); }
if (!sqlRead.IsDBNull(120)) { CrmPriceCarrierEntity.OF20RS = sqlRead.GetDecimal(120); }
if (!sqlRead.IsDBNull(121)) { CrmPriceCarrierEntity.BAF20RS = sqlRead.GetDecimal(121); }
if (!sqlRead.IsDBNull(122)) { CrmPriceCarrierEntity.CAF20RS = sqlRead.GetDecimal(122); }
if (!sqlRead.IsDBNull(123)) { CrmPriceCarrierEntity.PSS20RS = sqlRead.GetDecimal(123); }
if (!sqlRead.IsDBNull(124)) { CrmPriceCarrierEntity.GRI20RS = sqlRead.GetDecimal(124); }
if (!sqlRead.IsDBNull(125)) { CrmPriceCarrierEntity.INLAND20RS = sqlRead.GetDecimal(125); }
if (!sqlRead.IsDBNull(126)) { CrmPriceCarrierEntity.ISPS20RS = sqlRead.GetDecimal(126); }
if (!sqlRead.IsDBNull(127)) { CrmPriceCarrierEntity.SZ20RS = sqlRead.GetDecimal(127); }
if (!sqlRead.IsDBNull(128)) { CrmPriceCarrierEntity.AG20RS = sqlRead.GetDecimal(128); }
if (!sqlRead.IsDBNull(129)) { CrmPriceCarrierEntity.D_40NOR0 = sqlRead.GetDecimal(129); }
if (!sqlRead.IsDBNull(130)) { CrmPriceCarrierEntity.D_40NOR1 = sqlRead.GetDecimal(130); }
if (!sqlRead.IsDBNull(131)) { CrmPriceCarrierEntity.D_40NOR2 = sqlRead.GetDecimal(131); }
if (!sqlRead.IsDBNull(132)) { CrmPriceCarrierEntity.D_40NOR3 = sqlRead.GetDecimal(132); }
if (!sqlRead.IsDBNull(133)) { CrmPriceCarrierEntity.PROFIT40NOR1 = sqlRead.GetDecimal(133); }
if (!sqlRead.IsDBNull(134)) { CrmPriceCarrierEntity.PROFIT40NOR2 = sqlRead.GetDecimal(134); }
if (!sqlRead.IsDBNull(135)) { CrmPriceCarrierEntity.PROFIT40NOR3 = sqlRead.GetDecimal(135); }
if (!sqlRead.IsDBNull(136)) { CrmPriceCarrierEntity.OF40NOR = sqlRead.GetDecimal(136); }
if (!sqlRead.IsDBNull(137)) { CrmPriceCarrierEntity.BAF40NOR = sqlRead.GetDecimal(137); }
if (!sqlRead.IsDBNull(138)) { CrmPriceCarrierEntity.CAF40NOR = sqlRead.GetDecimal(138); }
if (!sqlRead.IsDBNull(139)) { CrmPriceCarrierEntity.PSS40NOR = sqlRead.GetDecimal(139); }
if (!sqlRead.IsDBNull(140)) { CrmPriceCarrierEntity.GRI40NOR = sqlRead.GetDecimal(140); }
if (!sqlRead.IsDBNull(141)) { CrmPriceCarrierEntity.INLAND40NOR = sqlRead.GetDecimal(141); }
if (!sqlRead.IsDBNull(142)) { CrmPriceCarrierEntity.ISPS40NOR = sqlRead.GetDecimal(142); }
if (!sqlRead.IsDBNull(143)) { CrmPriceCarrierEntity.SZ40NOR = sqlRead.GetDecimal(143); }
if (!sqlRead.IsDBNull(144)) { CrmPriceCarrierEntity.AG40NOR = sqlRead.GetDecimal(144); }
}
}
catch (Exception exceError)
{
//抛出异常
throw exceError;
}
}
return CrmPriceCarrierEntity;
}
#endregion
/// <summary>
/// 插入信息
/// </summary>
/// <param name="CrmPriceCarrierEntity">实体类</param>
/// <returns>值为1插入数据正常,-1操作异常</returns>
public int InserInfo(CrmPriceCarrierEntity infoEntity)
{
int iResult = 0;
//获取参数
SqlParameter[] parms = GetInsertParms();
parms[0].Value = infoEntity.GID;//惟一编号
parms[1].Value = infoEntity.PODLOAD;//起运港
parms[2].Value = infoEntity.PORTDISCHARGE;//卸货港
parms[3].Value = infoEntity.DESTINATION;//目的地
parms[4].Value = infoEntity.CARRIER;//船公司
parms[5].Value = infoEntity.FORWARDER;//订舱代理
parms[6].Value = infoEntity.ETD;//开航日
parms[7].Value = infoEntity.TT;//航程
parms[8].Value = infoEntity.VIA;//中转港
parms[9].Value = infoEntity.POC;//挂靠港
parms[10].Value = infoEntity.SVC;//服务
parms[11].Value = infoEntity.LANE;//航线
parms[12].Value = infoEntity.CARRIERLANE;//船公司航线代码
parms[13].Value = infoEntity.OWS;//超重费
parms[14].Value = infoEntity.INPUTBY;//录入人
parms[15].Value = infoEntity.COMMODITY;//品名
parms[16].Value = infoEntity.SC;//合约方
parms[17].Value = infoEntity.NAMEAC;//合约内容
parms[18].Value = infoEntity.SICUT;//AMS时间
parms[19].Value = infoEntity.CUSCLSG;//截关时间
parms[20].Value = infoEntity.CYCLSG;//操作时间
parms[21].Value = infoEntity.D_20GP0;//成本价
parms[22].Value = infoEntity.D_20GP1;//一级售价
parms[23].Value = infoEntity.D_20GP2;//二级售价
parms[24].Value = infoEntity.D_20GP3;//三级售价
parms[25].Value = infoEntity.D_40GP0;//
parms[26].Value = infoEntity.D_40GP1;//
parms[27].Value = infoEntity.D_40GP2;//
parms[28].Value = infoEntity.D_40GP3;//
parms[29].Value = infoEntity.D_40HQ0;//
parms[30].Value = infoEntity.D_40HQ1;//
parms[31].Value = infoEntity.D_40HQ2;//
parms[32].Value = infoEntity.D_40HQ3;//
parms[33].Value = infoEntity.D_45HQ0;//
parms[34].Value = infoEntity.D_45HQ1;//
parms[35].Value = infoEntity.D_45HQ2;//
parms[36].Value = infoEntity.D_45HQ3;//
parms[37].Value = infoEntity.PROFIT20GP1;// OF售价
parms[38].Value = infoEntity.PROFIT40GP1;// BAF售价
parms[39].Value = infoEntity.PROFIT40HQ1;// CAF售价
parms[40].Value = infoEntity.PROFIT45HQ1;// PSS售价
parms[41].Value = infoEntity.OF20GP;// OF售价
parms[42].Value = infoEntity.BAF20GP;// BAF售价
parms[43].Value = infoEntity.CAF20GP;// CAF售价
parms[44].Value = infoEntity.PSS20GP;// PSS售价
parms[45].Value = infoEntity.GRI20GP;// GRI售价
parms[46].Value = infoEntity.INLAND20GP;// INLAND售价
parms[47].Value = infoEntity.ISPS20GP;// ISPS售价
parms[48].Value = infoEntity.SZ20GP;// SZ售价
parms[49].Value = infoEntity.AG20GP;// AG售价
parms[50].Value = infoEntity.OF40GP;// OF售价
parms[51].Value = infoEntity.BAF40GP;// BAF售价
parms[52].Value = infoEntity.CAF40GP;// CAF售价
parms[53].Value = infoEntity.PSS40GP;// PSS售价
parms[54].Value = infoEntity.GRI40GP;// GRI售价
parms[55].Value = infoEntity.INLAND40GP;// INLAND售价
parms[56].Value = infoEntity.ISPS40GP;// ISPS售价
parms[57].Value = infoEntity.SZ40GP;// SZ售价
parms[58].Value = infoEntity.AG40GP;// AG售价
parms[59].Value = infoEntity.OF40HQ;// OF售价
parms[60].Value = infoEntity.BAF40HQ;// BAF售价
parms[61].Value = infoEntity.CAF40HQ;// CAF售价
parms[62].Value = infoEntity.PSS40HQ;// PSS售价
parms[63].Value = infoEntity.GRI40HQ;// GRI售价
parms[64].Value = infoEntity.INLAND40HQ;// INLAND售价
parms[65].Value = infoEntity.ISPS40HQ;// ISPS售价
parms[66].Value = infoEntity.SZ40HQ;// SZ售价
parms[67].Value = infoEntity.AG40HQ;// AG售价
parms[68].Value = infoEntity.OF45HQ;// OF售价
parms[69].Value = infoEntity.BAF45HQ;// BAF售价
parms[70].Value = infoEntity.CAF45HQ;// CAF售价
parms[71].Value = infoEntity.PSS45HQ;// PSS售价
parms[72].Value = infoEntity.GRI45HQ;// GRI售价
parms[73].Value = infoEntity.INLAND45HQ;// INLAND售价
parms[74].Value = infoEntity.ISPS45HQ;// ISPS售价
parms[75].Value = infoEntity.SZ45HQ;// SZ售价
parms[76].Value = infoEntity.AG45HQ;// AG售价
parms[77].Value = infoEntity.REMARK;// 备注
parms[78].Value = infoEntity.CARRIERCN;//
parms[79].Value = infoEntity.BOOKINGFEE;//
parms[80].Value = infoEntity.CTNFEE;//
parms[81].Value = infoEntity.THCFEE;//
parms[82].Value = infoEntity.FILEFEE;//
parms[83].Value = infoEntity.LCLCOST;//
parms[84].Value = infoEntity.LCLPRICE;//
parms[85].Value = infoEntity.CISF;//
parms[86].Value = infoEntity.REMARK2;//
parms[87].Value = infoEntity.TYPE;//
parms[88].Value = infoEntity.CORPID;//
parms[89].Value = infoEntity.D_40RH0;
parms[90].Value = infoEntity.D_40RH1;
parms[91].Value = infoEntity.D_40RH2;
parms[92].Value = infoEntity.D_40RH3;
parms[93].Value = infoEntity.PROFIT40RH1;
parms[94].Value = infoEntity.PROFIT40RH2;
parms[95].Value = infoEntity.PROFIT40RH3;
parms[96].Value = infoEntity.OF40RH;
parms[97].Value = infoEntity.BAF40RH;
parms[98].Value = infoEntity.CAF40RH;
parms[99].Value = infoEntity.PSS40RH;
parms[100].Value = infoEntity.GRI40RH;
parms[101].Value = infoEntity.INLAND40RH;
parms[102].Value = infoEntity.ISPS40RH;
parms[103].Value = infoEntity.SZ40RH;
parms[104].Value = infoEntity.AG40RH;
parms[105].Value = infoEntity.PIRICEVIAPORT;
parms[106].Value = infoEntity.D_20RS0;
parms[107].Value = infoEntity.D_20RS1;
parms[108].Value = infoEntity.D_20RS2;
parms[109].Value = infoEntity.D_20RS3;
parms[110].Value = infoEntity.PROFIT20RS1;
parms[111].Value = infoEntity.PROFIT20RS2;
parms[112].Value = infoEntity.PROFIT20RS3;
parms[113].Value = infoEntity.OF20RS;
parms[114].Value = infoEntity.BAF20RS;
parms[115].Value = infoEntity.CAF20RS;
parms[116].Value = infoEntity.PSS20RS;
parms[117].Value = infoEntity.GRI20RS;
parms[118].Value = infoEntity.INLAND20RS;
parms[119].Value = infoEntity.ISPS20RS;
parms[120].Value = infoEntity.SZ20RS;
parms[121].Value = infoEntity.AG20RS;
parms[122].Value = infoEntity.D_40NOR0;
parms[123].Value = infoEntity.D_40NOR1;
parms[124].Value = infoEntity.D_40NOR2;
parms[125].Value = infoEntity.D_40NOR3;
parms[126].Value = infoEntity.PROFIT40NOR1;
parms[127].Value = infoEntity.PROFIT40NOR2;
parms[128].Value = infoEntity.PROFIT40NOR3;
parms[129].Value = infoEntity.OF40NOR;
parms[130].Value = infoEntity.BAF40NOR;
parms[131].Value = infoEntity.CAF40NOR;
parms[132].Value = infoEntity.PSS40NOR;
parms[133].Value = infoEntity.GRI40NOR;
parms[134].Value = infoEntity.INLAND40NOR;
parms[135].Value = infoEntity.ISPS40NOR;
parms[136].Value = infoEntity.SZ40NOR;
parms[137].Value = infoEntity.AG40NOR;
//parms[1].Value = infoEntity.LOCKFLAG;//是否锁定
//parms[1].Value = infoEntity.ISISSUE;//是否发布
// VALIDDATE;//有效期 datetime
// EFFECTIVEDATE;//生效期 datetime
// INPUTTIME;//录入日期 datetime
// MODIFYTIME;//最后修改日期 datetime
//有效期
string strVALIDDATE = infoEntity.VALIDDATE.ToString().IndexOf("0001")>-1 ? "" : "'" + infoEntity.VALIDDATE.ToString() + "',";
string strVALIDDATE_name = strVALIDDATE.Equals("") ? "" : "VALIDDATE,";
//生效期
string strEFFECTIVEDATE = infoEntity.EFFECTIVEDATE.ToString().IndexOf("0001")>-1 ? "" : "'" + infoEntity.EFFECTIVEDATE.ToString() + "',";
string strEFFECTIVEDATE_name = strEFFECTIVEDATE.Equals("") ? "" : "EFFECTIVEDATE,";
SQL_INSERT_INFO = String.Format(SQL_INSERT_INFO, strVALIDDATE_name, strVALIDDATE, strEFFECTIVEDATE_name, strEFFECTIVEDATE);
//
using (SqlConnection conn = new SqlConnection(SqlHelper.ConnectionStringLocalTransaction))
{
int existVal = SqlHelper.ExecuteNonQuery(conn, CommandType.Text, SQL_INSERT_INFO, parms);
if (existVal > 0)
{
iResult = 1;
//
//string str0 = "insert into sys_log(NAME,LOGTYPE,LOGCONTENT,CREATEUSER) values('插入运价管理表crm_price_carrier','插入操作','GID=" + infoEntity.GID + "','" + infoEntity.INPUTBY + "')";
//bool bl0 = SqlHelper.ExecuteSqlCommand(SqlHelper.ConnectionStringLocalTransaction, str0);
}
else
{
iResult = -1;//执行异常
}
}
return iResult;
}
/// <summary>
/// 更新信息
/// </summary>
/// <param name="CrmPriceCarrierEntity">实体类</param>
/// <returns>值为1更新数据正常,-1操作异常</returns>
public int UpdateInfo(CrmPriceCarrierEntity infoEntity)
{
int iResult = 0;
//获取参数
SqlParameter[] parms = GetUpdateParms();
parms[0].Value = infoEntity.GID;//惟一编号
parms[1].Value = infoEntity.PODLOAD;//起运港
parms[2].Value = infoEntity.PORTDISCHARGE;//卸货港
parms[3].Value = infoEntity.DESTINATION;//目的地
parms[4].Value = infoEntity.CARRIER;//船公司
parms[5].Value = infoEntity.FORWARDER;//订舱代理
parms[6].Value = infoEntity.ETD;//开航日
parms[7].Value = infoEntity.TT;//航程
parms[8].Value = infoEntity.VIA;//中转港
parms[9].Value = infoEntity.POC;//挂靠港
parms[10].Value = infoEntity.SVC;//服务
parms[11].Value = infoEntity.LANE;//航线
parms[12].Value = infoEntity.CARRIERLANE;//船公司航线代码
parms[13].Value = infoEntity.OWS;//超重费
parms[14].Value = infoEntity.MODIFIEDUSER;//最后一次录入人
parms[15].Value = infoEntity.COMMODITY;//品名
parms[16].Value = infoEntity.SC;//合约方
parms[17].Value = infoEntity.NAMEAC;//合约内容
parms[18].Value = infoEntity.SICUT;//AMS时间
parms[19].Value = infoEntity.CUSCLSG;//截关时间
parms[20].Value = infoEntity.CYCLSG;//操作时间
parms[21].Value = infoEntity.D_20GP0;//成本价
parms[22].Value = infoEntity.D_20GP1;//一级售价
parms[23].Value = infoEntity.D_20GP2;//二级售价
parms[24].Value = infoEntity.D_20GP3;//三级售价
parms[25].Value = infoEntity.D_40GP0;//
parms[26].Value = infoEntity.D_40GP1;//
parms[27].Value = infoEntity.D_40GP2;//
parms[28].Value = infoEntity.D_40GP3;//
parms[29].Value = infoEntity.D_40HQ0;//
parms[30].Value = infoEntity.D_40HQ1;//
parms[31].Value = infoEntity.D_40HQ2;//
parms[32].Value = infoEntity.D_40HQ3;//
parms[33].Value = infoEntity.D_45HQ0;//
parms[34].Value = infoEntity.D_45HQ1;//
parms[35].Value = infoEntity.D_45HQ2;//
parms[36].Value = infoEntity.D_45HQ3;//
parms[37].Value = infoEntity.PROFIT20GP1;// OF售价
parms[38].Value = infoEntity.PROFIT40GP1;// BAF售价
parms[39].Value = infoEntity.PROFIT40HQ1;// CAF售价
parms[40].Value = infoEntity.PROFIT45HQ1;// PSS售价
parms[41].Value = infoEntity.OF20GP;// OF售价
parms[42].Value = infoEntity.BAF20GP;// BAF售价
parms[43].Value = infoEntity.CAF20GP;// CAF售价
parms[44].Value = infoEntity.PSS20GP;// PSS售价
parms[45].Value = infoEntity.GRI20GP;// GRI售价
parms[46].Value = infoEntity.INLAND20GP;// INLAND售价
parms[47].Value = infoEntity.ISPS20GP;// ISPS售价
parms[48].Value = infoEntity.SZ20GP;// SZ售价
parms[49].Value = infoEntity.AG20GP;// AG售价
parms[50].Value = infoEntity.OF40GP;// OF售价
parms[51].Value = infoEntity.BAF40GP;// BAF售价
parms[52].Value = infoEntity.CAF40GP;// CAF售价
parms[53].Value = infoEntity.PSS40GP;// PSS售价
parms[54].Value = infoEntity.GRI40GP;// GRI售价
parms[55].Value = infoEntity.INLAND40GP;// INLAND售价
parms[56].Value = infoEntity.ISPS40GP;// ISPS售价
parms[57].Value = infoEntity.SZ40GP;// SZ售价
parms[58].Value = infoEntity.AG40GP;// AG售价
parms[59].Value = infoEntity.OF40HQ;// OF售价
parms[60].Value = infoEntity.BAF40HQ;// BAF售价
parms[61].Value = infoEntity.CAF40HQ;// CAF售价
parms[62].Value = infoEntity.PSS40HQ;// PSS售价
parms[63].Value = infoEntity.GRI40HQ;// GRI售价
parms[64].Value = infoEntity.INLAND40HQ;// INLAND售价
parms[65].Value = infoEntity.ISPS40HQ;// ISPS售价
parms[66].Value = infoEntity.SZ40HQ;// SZ售价
parms[67].Value = infoEntity.AG40HQ;// AG售价
parms[68].Value = infoEntity.OF45HQ;// OF售价
parms[69].Value = infoEntity.BAF45HQ;// BAF售价
parms[70].Value = infoEntity.CAF45HQ;// CAF售价
parms[71].Value = infoEntity.PSS45HQ;// PSS售价
parms[72].Value = infoEntity.GRI45HQ;// GRI售价
parms[73].Value = infoEntity.INLAND45HQ;// INLAND售价
parms[74].Value = infoEntity.ISPS45HQ;// ISPS售价
parms[75].Value = infoEntity.SZ45HQ;// SZ售价
parms[76].Value = infoEntity.AG45HQ;// AG售价
parms[77].Value = infoEntity.REMARK;// 备注
parms[78].Value = infoEntity.CARRIERCN;//
parms[79].Value = infoEntity.BOOKINGFEE;//
parms[80].Value = infoEntity.CTNFEE;//
parms[81].Value = infoEntity.THCFEE;//
parms[82].Value = infoEntity.FILEFEE;//
parms[83].Value = infoEntity.LCLCOST;//
parms[84].Value = infoEntity.LCLPRICE;//
parms[85].Value = infoEntity.CISF;//
parms[86].Value = infoEntity.REMARK2;//
parms[87].Value = infoEntity.D_40RH0;
parms[88].Value = infoEntity.D_40RH1;
parms[89].Value = infoEntity.D_40RH2;
parms[90].Value = infoEntity.D_40RH3;
parms[91].Value = infoEntity.PROFIT40RH1;
parms[92].Value = infoEntity.PROFIT40RH2;
parms[93].Value = infoEntity.PROFIT40RH3;
parms[94].Value = infoEntity.OF40RH;
parms[95].Value = infoEntity.BAF40RH;
parms[96].Value = infoEntity.CAF40RH;
parms[97].Value = infoEntity.PSS40RH;
parms[98].Value = infoEntity.GRI40RH;
parms[99].Value = infoEntity.INLAND40RH;
parms[100].Value = infoEntity.ISPS40RH;
parms[101].Value = infoEntity.SZ40RH;
parms[102].Value = infoEntity.AG40RH;
parms[103].Value = infoEntity.PIRICEVIAPORT;
parms[104].Value = infoEntity.D_20RS0;
parms[105].Value = infoEntity.D_20RS1;
parms[106].Value = infoEntity.D_20RS2;
parms[107].Value = infoEntity.D_20RS3;
parms[108].Value = infoEntity.PROFIT20RS1;
parms[109].Value = infoEntity.PROFIT20RS2;
parms[110].Value = infoEntity.PROFIT20RS3;
parms[111].Value = infoEntity.OF20RS;
parms[112].Value = infoEntity.BAF20RS;
parms[113].Value = infoEntity.CAF20RS;
parms[114].Value = infoEntity.PSS20RS;
parms[115].Value = infoEntity.GRI20RS;
parms[116].Value = infoEntity.INLAND20RS;
parms[117].Value = infoEntity.ISPS20RS;
parms[118].Value = infoEntity.SZ20RS;
parms[119].Value = infoEntity.AG20RS;
parms[120].Value = infoEntity.D_40NOR0;
parms[121].Value = infoEntity.D_40NOR1;
parms[122].Value = infoEntity.D_40NOR2;
parms[123].Value = infoEntity.D_40NOR3;
parms[124].Value = infoEntity.PROFIT40NOR1;
parms[125].Value = infoEntity.PROFIT40NOR2;
parms[126].Value = infoEntity.PROFIT40NOR3;
parms[127].Value = infoEntity.OF40NOR;
parms[128].Value = infoEntity.BAF40NOR;
parms[129].Value = infoEntity.CAF40NOR;
parms[130].Value = infoEntity.PSS40NOR;
parms[131].Value = infoEntity.GRI40NOR;
parms[132].Value = infoEntity.INLAND40NOR;
parms[133].Value = infoEntity.ISPS40NOR;
parms[134].Value = infoEntity.SZ40NOR;
parms[135].Value = infoEntity.AG40NOR;
//parms[87].Value = infoEntity.TYPE;//
//parms[1].Value = infoEntity.LOCKFLAG;//是否锁定
//parms[1].Value = infoEntity.ISISSUE;//是否发布
//parms[37] . Value = infoEntity . INPUTBY;//录入人
// VALIDDATE;//有效期 datetime
// EFFECTIVEDATE;//生效期 datetime
// INPUTTIME;//录入日期 datetime
// MODIFYTIME;//最后修改日期 datetime
//有效期
string strVALIDDATE = infoEntity.VALIDDATE.ToString().IndexOf("0001")>-1 ? "null," : "'" + infoEntity.VALIDDATE.ToString() + "',";
string strVALIDDATE_name = "VALIDDATE=";
//生效期
string strEFFECTIVEDATE = infoEntity.EFFECTIVEDATE.ToString().IndexOf("0001")>-1 ? "null," : "'" + infoEntity.EFFECTIVEDATE.ToString() + "',";
string strEFFECTIVEDATE_name = "EFFECTIVEDATE=";
//最后修改日期
//string strMODIFYTIME = infoEntity.MODIFYTIME.ToString().IndexOf("0001")>-1 ? "null," : "'" + infoEntity.MODIFYTIME.ToString() + "',";
//string strMODIFYTIME_name = "MODIFYTIME=";
SQL_UPDATE_INFO = String.Format(SQL_UPDATE_INFO, strVALIDDATE_name, strVALIDDATE, strEFFECTIVEDATE_name, strEFFECTIVEDATE);//,strMODIFYTIME_name,strMODIFYTIME);
//
using (SqlConnection conn = new SqlConnection(SqlHelper.ConnectionStringLocalTransaction))
{
int existVal = SqlHelper.ExecuteNonQuery(conn, CommandType.Text, SQL_UPDATE_INFO, parms);
if (existVal > 0)
{
iResult = 1;
//
//string str0 = "insert into sys_log(NAME,LOGTYPE,LOGCONTENT,CREATEUSER) values('更新运价管理表crm_price_carrier内容','更新操作','GID=" + infoEntity.GID + "','')";
//bool bl0 = SqlHelper.ExecuteSqlCommand(SqlHelper.ConnectionStringLocalTransaction, str0);
}
else
{
iResult = -1;//执行异常
}
}
return iResult;
}
/// <summary>
/// 插入信息
/// </summary>
/// <param name="CrmPriceCarrierEntity">实体类</param>
/// <returns>值为1插入数据正常,-1操作异常</returns>
public int InserInfoCNTRTOTAL(string strSql, string strUserID)
{
int iResult = 0;
//
using (SqlConnection conn = new SqlConnection(SqlHelper.ConnectionStringLocalTransaction))
{
int existVal = SqlHelper.ExecuteNonQuery(conn, CommandType.Text, strSql, null);
if (existVal > 0)
{
iResult = 1;
//
//strSql = strSql.Trim().Replace("'", "''");
//string str0 = "insert into sys_log(NAME,LOGTYPE,LOGCONTENT,CREATEUSER) values('插入crm_price_carrier海运业务预订舱表集装箱字段','插入操作','" + strSql + "','" + strUserID + "')";
//bool bl0 = SqlHelper.ExecuteSqlCommand(SqlHelper.ConnectionStringLocalTransaction, str0);
}
else
{
iResult = -1;//执行异常
}
}
return iResult;
}
#region 生成插入语句参数
/// <summary>
/// 生成插入语句参数
/// </summary>
/// <returns>返回SqlParameter数组</returns>
private SqlParameter[] GetInsertParms()
{
SqlParameter[] parms = new SqlParameter[]{
new SqlParameter("@GID",SqlDbType.VarChar,36),//惟一编号
//new SqlParameter("@LOCKFLAG",SqlDbType.Bit),//是否锁定
new SqlParameter("@PODLOAD",SqlDbType.VarChar,60),//起运港
new SqlParameter("@PORTDISCHARGE",SqlDbType.VarChar,60),//卸货港
new SqlParameter("@DESTINATION",SqlDbType.VarChar,60),//目的地
new SqlParameter("@CARRIER",SqlDbType.VarChar,50),//船公司
new SqlParameter("@FORWARDER",SqlDbType.VarChar,20),//订舱代理
new SqlParameter("@ETD",SqlDbType.VarChar,50),//开航日
new SqlParameter("@TT",SqlDbType.VarChar,50),//航程
new SqlParameter("@VIA",SqlDbType.VarChar,60),//中转港
new SqlParameter("@POC",SqlDbType.VarChar,100),//挂靠港
new SqlParameter("@SVC",SqlDbType.VarChar,50),//服务
new SqlParameter("@LANE",SqlDbType.VarChar,50),//航线
new SqlParameter("@CARRIERLANE",SqlDbType.VarChar,50),//船公司航线代码
new SqlParameter("@OWS",SqlDbType.VarChar,200),//超重费
new SqlParameter("@INPUTBY",SqlDbType.VarChar,36),//录入人
new SqlParameter("@COMMODITY",SqlDbType.VarChar,600),//品名
new SqlParameter("@SC",SqlDbType.VarChar,50),//合约方
new SqlParameter("@NAMEAC",SqlDbType.VarChar,100),//合约内容
new SqlParameter("@SICUT",SqlDbType.VarChar,50),//AMS时间
new SqlParameter("@CUSCLSG",SqlDbType.VarChar,50),//截关时间
new SqlParameter("@CYCLSG",SqlDbType.VarChar,50),//操作时间
new SqlParameter("@D_20GP0",SqlDbType.Decimal),//成本价
new SqlParameter("@D_20GP1",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_20GP2",SqlDbType.Decimal),//二级售价
new SqlParameter("@D_20GP3",SqlDbType.Decimal),//三级售价
new SqlParameter("@D_40GP0",SqlDbType.Decimal),//
new SqlParameter("@D_40GP1",SqlDbType.Decimal),//
new SqlParameter("@D_40GP2",SqlDbType.Decimal),//
new SqlParameter("@D_40GP3",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ3",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ3",SqlDbType.Decimal),//
new SqlParameter("@PROFIT20GP1",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP1",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ1",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT45HQ1",SqlDbType.Decimal),// PSS售价
new SqlParameter("@OF20GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF20GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF20GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS20GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI20GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND20GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS20GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ20GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG20GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF45HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF45HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF45HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS45HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI45HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND45HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS45HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ45HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG45HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@REMARK",SqlDbType.VarChar,1024),// 备注
new SqlParameter("@CARRIERCN",SqlDbType.VarChar,100),//
new SqlParameter("@BOOKINGFEE",SqlDbType.VarChar,50),//
new SqlParameter("@CTNFEE",SqlDbType.VarChar,50),//
new SqlParameter("@THCFEE",SqlDbType.VarChar,50),//
new SqlParameter("@FILEFEE",SqlDbType.VarChar,50),//
new SqlParameter("@LCLCOST",SqlDbType.VarChar,50),//
new SqlParameter("@LCLPRICE",SqlDbType.VarChar,50),//
new SqlParameter("@CISF",SqlDbType.VarChar,50),//
new SqlParameter("@REMARK2",SqlDbType.VarChar,1024),//
new SqlParameter("@TYPE",SqlDbType.VarChar,3),//
new SqlParameter("@CORPID",SqlDbType.VarChar,36),
new SqlParameter("@D_40RH0", SqlDbType.Decimal,9),
new SqlParameter("@D_40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@OF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@BAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@CAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PSS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@GRI40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@INLAND40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@ISPS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@SZ40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@AG40RH", SqlDbType.Decimal,9),
new SqlParameter("@PIRICEVIAPORT",SqlDbType.VarChar,60),
new SqlParameter("@D_20RS0", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS1", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS2", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS3", SqlDbType.Decimal,9),
new SqlParameter("@OF20RS", SqlDbType.Decimal,9),
new SqlParameter("@BAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@CAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@PSS20RS", SqlDbType.Decimal,9),
new SqlParameter("@GRI20RS", SqlDbType.Decimal,9),
new SqlParameter("@INLAND20RS", SqlDbType.Decimal,9),
new SqlParameter("@ISPS20RS", SqlDbType.Decimal,9),
new SqlParameter("@SZ20RS", SqlDbType.Decimal,9),
new SqlParameter("@AG20RS", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR0", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@OF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@BAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@CAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@PSS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@GRI40NOR", SqlDbType.Decimal,9),
new SqlParameter("@INLAND40NOR", SqlDbType.Decimal,9),
new SqlParameter("@ISPS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@SZ40NOR", SqlDbType.Decimal,9),
new SqlParameter("@AG40NOR", SqlDbType.Decimal,9)
//new SqlParameter("@ISISSUE",SqlDbType.Bit),//是否发布
// VALIDDATE datetime ;// 有效期
// EFFECTIVEDATE datetime ;// 生效期
// INPUTTIME datetime ;// 录入日期
// MODIFYTIME datetime ;// 最后修改日期
};
return parms;
}
#endregion
#region 生成更新语句参数
/// <summary>
/// 生成更新语句参数
/// </summary>
/// <returns>返回SqlParameter数组</returns>
private SqlParameter[] GetUpdateParms()
{
SqlParameter[] parms = new SqlParameter[]{
new SqlParameter("@GID",SqlDbType.VarChar,36),//惟一编号
//new SqlParameter("@LOCKFLAG",SqlDbType.Bit),//是否锁定
new SqlParameter("@PODLOAD",SqlDbType.VarChar,60),//起运港
new SqlParameter("@PORTDISCHARGE",SqlDbType.VarChar,60),//卸货港
new SqlParameter("@DESTINATION",SqlDbType.VarChar,60),//目的地
new SqlParameter("@CARRIER",SqlDbType.VarChar,50),//船公司
new SqlParameter("@FORWARDER",SqlDbType.VarChar,20),//订舱代理
new SqlParameter("@ETD",SqlDbType.VarChar,50),//开航日
new SqlParameter("@TT",SqlDbType.VarChar,50),//航程
new SqlParameter("@VIA",SqlDbType.VarChar,60),//中转港
new SqlParameter("@POC",SqlDbType.VarChar,100),//挂靠港
new SqlParameter("@SVC",SqlDbType.VarChar,50),//服务
new SqlParameter("@LANE",SqlDbType.VarChar,50),//航线
new SqlParameter("@CARRIERLANE",SqlDbType.VarChar,50),//船公司航线代码
new SqlParameter("@OWS",SqlDbType.VarChar,200),//超重费
new SqlParameter("@MODIFIEDUSER",SqlDbType.VarChar,36),//最后一次录入人
new SqlParameter("@COMMODITY",SqlDbType.VarChar,600),//品名
new SqlParameter("@SC",SqlDbType.VarChar,50),//合约方
new SqlParameter("@NAMEAC",SqlDbType.VarChar,100),//合约内容
new SqlParameter("@SICUT",SqlDbType.VarChar,50),//AMS时间
new SqlParameter("@CUSCLSG",SqlDbType.VarChar,50),//截关时间
new SqlParameter("@CYCLSG",SqlDbType.VarChar,50),//操作时间
new SqlParameter("@D_20GP0",SqlDbType.Decimal),//成本价
new SqlParameter("@D_20GP1",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_20GP2",SqlDbType.Decimal),//二级售价
new SqlParameter("@D_20GP3",SqlDbType.Decimal),//三级售价
new SqlParameter("@D_40GP0",SqlDbType.Decimal),//
new SqlParameter("@D_40GP1",SqlDbType.Decimal),//
new SqlParameter("@D_40GP2",SqlDbType.Decimal),//
new SqlParameter("@D_40GP3",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ3",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ3",SqlDbType.Decimal),//
new SqlParameter("@PROFIT20GP1",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP1",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ1",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT45HQ1",SqlDbType.Decimal),// PSS售价
new SqlParameter("@OF20GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF20GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF20GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS20GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI20GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND20GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS20GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ20GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG20GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF45HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF45HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF45HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS45HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI45HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND45HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS45HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ45HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG45HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@REMARK",SqlDbType.VarChar,1024),// 备注
new SqlParameter("@CARRIERCN",SqlDbType.VarChar,100),//
new SqlParameter("@BOOKINGFEE",SqlDbType.VarChar,50),//
new SqlParameter("@CTNFEE",SqlDbType.VarChar,50),//
new SqlParameter("@THCFEE",SqlDbType.VarChar,50),//
new SqlParameter("@FILEFEE",SqlDbType.VarChar,50),//
new SqlParameter("@LCLCOST",SqlDbType.VarChar,50),//
new SqlParameter("@LCLPRICE",SqlDbType.VarChar,50),//
new SqlParameter("@CISF",SqlDbType.VarChar,50),//
new SqlParameter("@REMARK2",SqlDbType.VarChar,1024),
new SqlParameter("@D_40RH0", SqlDbType.Decimal,9),
new SqlParameter("@D_40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@OF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@BAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@CAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PSS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@GRI40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@INLAND40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@ISPS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@SZ40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@AG40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PIRICEVIAPORT",SqlDbType.VarChar,60),
new SqlParameter("@D_20RS0", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS1", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS2", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS3", SqlDbType.Decimal,9),
new SqlParameter("@OF20RS", SqlDbType.Decimal,9),
new SqlParameter("@BAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@CAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@PSS20RS", SqlDbType.Decimal,9),
new SqlParameter("@GRI20RS", SqlDbType.Decimal,9),
new SqlParameter("@INLAND20RS", SqlDbType.Decimal,9),
new SqlParameter("@ISPS20RS", SqlDbType.Decimal,9),
new SqlParameter("@SZ20RS", SqlDbType.Decimal,9),
new SqlParameter("@AG20RS", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR0", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@OF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@BAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@CAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@PSS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@GRI40NOR", SqlDbType.Decimal,9),
new SqlParameter("@INLAND40NOR", SqlDbType.Decimal,9),
new SqlParameter("@ISPS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@SZ40NOR", SqlDbType.Decimal,9),
new SqlParameter("@AG40NOR", SqlDbType.Decimal,9)
//new SqlParameter("@TYPE",SqlDbType.VarChar,3)//
//new SqlParameter("@ISISSUE",SqlDbType.Bit),//是否发布
// VALIDDATE datetime ;// 有效期
// EFFECTIVEDATE datetime ;// 生效期
// INPUTTIME datetime ;// 录入日期
// MODIFYTIME datetime ;// 最后修改日期
};
return parms;
}
/// <summary>
/// 更新信息
/// </summary>
/// <param name="CrmPriceCarrierEntity">实体类</param>
/// <returns>值为1更新数据正常,-1操作异常</returns>
public int UpdateInfoCNTRTOTAL(string strSql, string strUserID)
{
int iResult = 0;
//
using (SqlConnection conn = new SqlConnection(SqlHelper.ConnectionStringLocalTransaction))
{
int existVal = SqlHelper.ExecuteNonQuery(conn, CommandType.Text, strSql, null);
if (existVal > 0)
{
iResult = 1;
//
//strSql = strSql.Trim().Replace("'", "''");
//string str0 = "insert into sys_log(NAME,LOGTYPE,LOGCONTENT,CREATEUSER) values('更新所有crm_price_carrier海运业务预订舱表集装箱字段','更新操作','" + strSql + "','" + strUserID + "')";
//bool bl0 = SqlHelper.ExecuteSqlCommand(SqlHelper.ConnectionStringLocalTransaction, str0);
}
else
{
iResult = -1;//执行异常
}
}
return iResult;
}
#endregion
#region 返回所有海运出口数据集
/// <summary>
/// 返回所有海运出口数据集
/// </summary>
/// <param name="strSql"></param>
/// <returns></returns>
public DataSet GetSeaExportList()
{
DataSet userSet = new DataSet();
userSet = SqlHelper.ExecuteDataset(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, SQL_SELECT_INFO);
return userSet;
}
#endregion
#region 根据SQL语句查询海运出口数据集
/// <summary>
/// 根据SQL语句查询海运出口数据集
/// </summary>
/// <param name="strSql"></param>
/// <returns></returns>
public DataSet GetSeaExportListByCondition(string strSql)
{
DataSet userSet = new DataSet();
userSet = SqlHelper.ExecuteDataset(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, strSql);
return userSet;
}
#endregion
#region 根据SQL语句查询海运出口数据集
/// <summary>
/// 返回 某字段
/// </summary>
/// <returns></returns>
public DataSet GetFieldAll(string strGID)
{
DataSet DS = new DataSet();
try
{
string str = "select * from crm_price_carrier where GID='" + strGID + "'";
DS = SqlHelper.OpenSqlDataSet(SqlHelper.ConnectionStringLocalTransaction, str);
int ii = DS.Tables[0].Rows.Count;
}
catch
{
DS = null;
}
return DS;
}
#endregion
#region 获取海运出口委托记录总页数
/// <summary>
/// 获取海运出口委托记录总页数
/// </summary>
/// <param name="strSql">sql查询语句</param>
/// <returns>返回int型海运出口委托记录总页数</returns>
public int GetPageTotal(string strSql)
{
int iResult = 0;
using (SqlDataReader sqlRead = SqlHelper.ExecuteReader(SqlHelper.ConnectionStringLocalTransaction, CommandType.Text, strSql, null))
{
try
{
while (sqlRead.Read())
{
iResult = sqlRead.GetInt32(0);
}
}
catch (Exception error)
{
throw error;
}
}
return iResult;
}
#endregion
#region 删除运价管理信息表
/// <summary>
/// 删除运价管理信息表
/// </summary>
/// <param name="strSel">运价管理信息表GID</param>
/// <param name="strUserID">删除人ID</param>
/// <returns>值1表示删除成功 值-1表示有异常删除失败 值-2表示插入异常,事务已回滚成功</returns>
public String GetCrmPriceCarrierDel(string strSel, string strUserID)
{
string alt = "";
string str = "delete from crm_price_carrier where 1=0 " + strSel;
bool bl = SqlHelper.ExecuteSqlCommand(SqlHelper.ConnectionStringLocalTransaction, str);
if (bl == false)
{
alt = "运价管理信息表crm_price_carrier删除操作出错";
return alt;
}
else
{
//str = str.Trim().Replace("'", "''");
//string str0 = "insert into sys_log(NAME,LOGTYPE,LOGCONTENT,CREATEUSER) values('删除运价管理信息表crm_price_carrier','删除操作','" + str + "','" + strUserID + "')";
//bool bl0 = SqlHelper.ExecuteSqlCommand(SqlHelper.ConnectionStringLocalTransaction, str0);
}
return alt;
}
#endregion
/// <summary>
/// 返回所有 分公司代码
/// </summary>
/// <param name="strUserID">用户GID</param>
/// <returns></returns>
public String GetCORPID(string strUserID)
{
string str = "select COMPANYID from user_company where USERID='" + strUserID + "' and COMPANYID in (select GID from [company] where ISDELETED=0 and ISDISABLE=0)";
DataSet DS = SqlHelper.OpenSqlDataSet(SqlHelper.ConnectionStringLocalTransaction, str);
if (DS.Tables[0].Rows.Count > 0)
{
str = DS.Tables[0].Rows[0]["COMPANYID"].ToString();
}
else
{
str = "";
}
return str;
}
/// <summary>
/// 海运代订舱运价
/// </summary>
/// <param name="dsexcel"></param>
/// <param name="strUserID"></param>
/// <returns></returns>
public int InsertInfoExcelLC(DataSet dsexcel, string strUserID,string strCORPID)
{
T_ALL_DA T_ALL_DA = new T_ALL_DA();
int iResult = 0;
string strPORTLOAD = T_ALL_DA.GetStrSQL("PORTLOAD", "select PORTLOAD from subcomp_seae_def where CORPID=(select GID from company where GID=(select COMPANYID from user_company where USERID='" + strUserID + "') and ISDELETED=0 and ISDISABLE=0)");//起运港
//
if (dsexcel.Tables[0].Rows.Count > 0)
{
foreach (DataTable myTable in dsexcel.Tables)
{
foreach (DataRow myRow in myTable.Rows)//遍历表
{
if (myRow["FLAG"].ToString().Trim().Equals("Y"))
{
try
{
string strCARRIER = myRow["CARRIER"] == null ? "" : myRow["CARRIER"].ToString().Trim();//船公司
string strLANE = myRow["LANE"] == null ? "" : myRow["LANE"].ToString().Trim();//航线
string strSQL = "select GID,LOCKFLAG,PODLOAD,PORTDISCHARGE,DESTINATION,CARRIER,FORWARDER,ETD,TT,VIA,POC,SVC,LANE,CARRIERLANE,OWS,VALIDDATE,EFFECTIVEDATE,INPUTBY,INPUTTIME,MODIFYTIME,COMMODITY,SC,NAMEAC,SICUT,CUSCLSG,CYCLSG,[20GP0],[20GP1],[20GP2],[20GP3],[40GP0],[40GP1],[40GP2],[40GP3],[40HQ0],[40HQ1],[40HQ2],[40HQ3],[45HQ0],[45HQ1],[45HQ2],[45HQ3],MODIFIEDUSER,ISISSUE,PROFIT20GP1,PROFIT40GP1,PROFIT40HQ1,PROFIT45HQ1,OF20GP,BAF20GP,CAF20GP,PSS20GP,GRI20GP,INLAND20GP,ISPS20GP,SZ20GP,AG20GP,OF40GP,BAF40GP,CAF40GP,PSS40GP,GRI40GP,INLAND40GP,ISPS40GP,SZ40GP,AG40GP,OF40HQ,BAF40HQ,CAF40HQ,PSS40HQ,GRI40HQ,INLAND40HQ,ISPS40HQ,SZ40HQ,AG40HQ,OF45HQ,BAF45HQ,CAF45HQ,PSS45HQ,GRI45HQ,INLAND45HQ,ISPS45HQ,SZ45HQ,AG45HQ,REMARK,CARRIERCN,BOOKINGFEE,CTNFEE,THCFEE,FILEFEE,LCLCOST,LCLPRICE,CISF,REMARK2,CORPID,[40RH0],[40RH1],[40RH2],[40RH3],PROFIT40RH1,PROFIT40RH2,PROFIT40RH3,OF40RH,BAF40RH,CAF40RH,PSS40RH,GRI40RH,INLAND40RH,ISPS40RH,SZ40RH,AG40RH,PIRICEVIAPORT,[20RS0],[20RS1],[20RS2],[20RS3],[PROFIT20RS1],[PROFIT20RS2],[PROFIT20RS3],[OF20RS],[BAF20RS],[CAF20RS],[PSS20RS],[GRI20RS],[INLAND20RS],[ISPS20RS],[SZ20RS],[AG20RS],[40NOR0],[40NOR1],[40NOR2],[40NOR3],[PROFIT40NOR1],[PROFIT40NOR2],[PROFIT40NOR3],[OF40NOR],[BAF40NOR],[CAF40NOR],[PSS40NOR],[GRI40NOR],[INLAND40NOR],[ISPS40NOR],[SZ40NOR],[AG40NOR] from crm_price_carrier where LANE='" + strLANE + "' and CARRIER='" + strCARRIER + "' and TYPE='LC' and CORPID='" + strCORPID.Trim() + "'";
DataSet ds = SqlHelper.OpenSqlDataSet(SqlHelper.ConnectionStringLocalTransaction, strSQL);
if (ds != null)
{
if (ds.Tables[0].Rows.Count > 0)
{
#region 生成更新语句参数
SqlParameter[] parms = new SqlParameter[]
{
new SqlParameter("@PORTDISCHARGE",SqlDbType.VarChar,60),//卸货港
new SqlParameter("@CARRIER",SqlDbType.VarChar,50),//船公司
new SqlParameter("@ETD",SqlDbType.VarChar,50),//开航日
new SqlParameter("@TT",SqlDbType.VarChar,50),//航程
new SqlParameter("@VIA",SqlDbType.VarChar,60),//中转港
new SqlParameter("@POC",SqlDbType.VarChar,100),//挂靠港
new SqlParameter("@SVC",SqlDbType.VarChar,50),//服务
new SqlParameter("@LANE",SqlDbType.VarChar,50),//航线
new SqlParameter("@CARRIERLANE",SqlDbType.VarChar,50),//船公司航线代码
new SqlParameter("@OWS",SqlDbType.VarChar,200),//超重费
new SqlParameter("@COMMODITY",SqlDbType.VarChar,1024),//品名
new SqlParameter("@D_20GP0",SqlDbType.Decimal),//成本价
new SqlParameter("@D_20GP1",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_40GP0",SqlDbType.Decimal),//
new SqlParameter("@D_40GP1",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ1",SqlDbType.Decimal),//
new SqlParameter("@PROFIT20GP1",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP1",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ1",SqlDbType.Decimal),// CAF售价
new SqlParameter("@OF20GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF20GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF20GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS20GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI20GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND20GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS20GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ20GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG20GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@REMARK",SqlDbType.VarChar,1024),// 备注
new SqlParameter("@MODIFIEDUSER",SqlDbType.VarChar,36),// 最后一次更新操作人GID
new SqlParameter("@CARRIERCN",SqlDbType.VarChar,100),//
new SqlParameter("@BOOKINGFEE",SqlDbType.VarChar,50),//
new SqlParameter("@CTNFEE",SqlDbType.VarChar,50),//
new SqlParameter("@THCFEE",SqlDbType.VarChar,50),//
new SqlParameter("@FILEFEE",SqlDbType.VarChar,50),//
new SqlParameter("@LCLCOST",SqlDbType.VarChar,50),//
new SqlParameter("@LCLPRICE",SqlDbType.VarChar,50),//
new SqlParameter("@CISF",SqlDbType.VarChar,50),//
new SqlParameter("@REMARK2",SqlDbType.VarChar,1024),//
new SqlParameter("@TYPE",SqlDbType.VarChar,3),//
new SqlParameter("@CORPID",SqlDbType.VarChar,36),
new SqlParameter("@D_40RH0", SqlDbType.Decimal,9),
new SqlParameter("@D_40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@OF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@BAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@CAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PSS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@GRI40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@INLAND40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@ISPS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@SZ40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@AG40RH", SqlDbType.Decimal,9),
new SqlParameter("@PIRICEVIAPORT",SqlDbType.VarChar,60),
new SqlParameter("@D_20RS0", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS1", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS2", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS3", SqlDbType.Decimal,9),
new SqlParameter("@OF20RS", SqlDbType.Decimal,9),
new SqlParameter("@BAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@CAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@PSS20RS", SqlDbType.Decimal,9),
new SqlParameter("@GRI20RS", SqlDbType.Decimal,9),
new SqlParameter("@INLAND20RS", SqlDbType.Decimal,9),
new SqlParameter("@ISPS20RS", SqlDbType.Decimal,9),
new SqlParameter("@SZ20RS", SqlDbType.Decimal,9),
new SqlParameter("@AG20RS", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR0", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@OF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@BAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@CAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@PSS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@GRI40NOR", SqlDbType.Decimal,9),
new SqlParameter("@INLAND40NOR", SqlDbType.Decimal,9),
new SqlParameter("@ISPS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@SZ40NOR", SqlDbType.Decimal,9),
new SqlParameter("@AG40NOR", SqlDbType.Decimal,9)
};
#endregion
#region 获取参数
parms[0].Value = "";//卸货港
parms[1].Value = myRow["CARRIER"] == null ? "" : myRow["CARRIER"].ToString().Trim();//船公司
parms[2].Value = "";//开航日
parms[3].Value = "";//航程
parms[4].Value = "";//中转港
parms[5].Value = "";//挂靠港
parms[6].Value = "";//服务
parms[7].Value = myRow["LANE"] == null ? "" : myRow["LANE"].ToString().Trim();//航线
parms[8].Value = "";//船公司航线代码
parms[9].Value = "";//超重费
parms[10].Value = "";//品名
parms[11].Value = 0;// 成本价
parms[12].Value = 0;// 一级售价
parms[13].Value = 0;//
parms[14].Value = 0;//
parms[15].Value = 0;//
parms[16].Value = 0;//
parms[17].Value = 0;// OF售价
parms[18].Value = 0;// BAF售价
parms[19].Value = 0;// CAF售价
parms[20].Value = 0;// OF售价
parms[21].Value = 0;// BAF售价
parms[22].Value = 0;// CAF售价
parms[23].Value = 0;// PSS售价
parms[24].Value = 0;// GRI售价
parms[25].Value = 0;// INLAND售价
parms[26].Value = 0;// ISPS售价
parms[27].Value = 0;// SZ售价
parms[28].Value = 0;// AG售价
parms[29].Value = 0;// OF售价
parms[30].Value = 0;// BAF售价
parms[31].Value = 0;// CAF售价
parms[32].Value = 0;// PSS售价
parms[33].Value = 0;// GRI售价
parms[34].Value = 0;// INLAND售价
parms[35].Value = 0;// ISPS售价
parms[36].Value = 0;// SZ售价
parms[37].Value = 0;// AG售价
parms[38].Value = 0;// OF售价
parms[39].Value = 0;// BAF售价
parms[40].Value = 0;// CAF售价
parms[41].Value = 0;// PSS售价
parms[42].Value = 0;// GRI售价
parms[43].Value = 0;// INLAND售价
parms[44].Value = 0;// ISPS售价
parms[45].Value = 0;// SZ售价
parms[46].Value = 0;// AG售价
parms[47].Value = myRow["REMARK"] == null ? "" : myRow["REMARK"].ToString().Trim();// 备注
parms[48].Value = strUserID;//
parms[49].Value = myRow["CARRIERCN"] == null ? "" : myRow["CARRIERCN"].ToString().Trim();//船公司中文名CARRIERCN
parms[50].Value = myRow["BOOKINGFEE"] == null ? "" : myRow["BOOKINGFEE"].ToString().Trim();//订舱费 BOOKINGFEE
parms[51].Value = myRow["CTNFEE"] == null ? "" : myRow["CTNFEE"].ToString().Trim();//箱封费 CTNFEE;//
parms[52].Value = myRow["THCFEE"] == null ? "" : myRow["THCFEE"].ToString().Trim();//THC THCFEE;//
parms[53].Value = myRow["FILEFEE"] == null ? "" : myRow["FILEFEE"].ToString().Trim();//文件费 FILEFEE;//
parms[54].Value = "";// LCLCOST
parms[55].Value = "";// LCLPRICE
parms[56].Value = "";// CISF
parms[57].Value = myRow["REMARK2"] == null ? "" : myRow["REMARK2"].ToString().Trim();// 备注2
parms[58].Value = 0;
parms[59].Value = 0;
parms[60].Value = 0;
parms[61].Value = 0;
parms[62].Value = 0;
parms[63].Value = 0;
parms[64].Value = 0;
parms[65].Value = 0;
parms[66].Value = 0;
parms[67].Value = 0;
parms[68].Value = 0;
parms[69].Value = 0;
parms[70].Value = 0;
parms[71].Value = 0;
parms[72].Value = 0;
parms[73].Value = 0;
//生效期
string strEFFECTIVEDATE = "EFFECTIVEDATE=null,";
if (!myRow["EFFECTIVEDATE"].ToString().Trim().Equals(""))
{
strEFFECTIVEDATE = "EFFECTIVEDATE='" + myRow["EFFECTIVEDATE"].ToString().Trim() + "',";
}
//有效期
//string strVALIDDATE = "VALIDDATE=null,";
//if (!myRow["VALIDDATE"].ToString().Trim().Equals(""))
//{
// strVALIDDATE = "VALIDDATE='" + myRow["VALIDDATE"].ToString().Trim() + "',";
//}
string SQL_UPDATE_INFO = "update crm_price_carrier set VIA=@VIA,POC=@POC,SVC=@SVC,LANE=@LANE,CARRIERLANE=@CARRIERLANE,OWS=@OWS,{0}COMMODITY=@COMMODITY,[20GP0]=@D_20GP0,[20GP1]=@D_20GP1,[40GP0]=@D_40GP0,[40GP1]=@D_40GP1,[40HQ0]=@D_40HQ0,[40HQ1]=@D_40HQ1,MODIFYTIME=getdate(),PROFIT20GP1=@PROFIT20GP1,PROFIT40GP1=@PROFIT40GP1,PROFIT40HQ1=@PROFIT40HQ1,OF20GP=@OF20GP,BAF20GP=@BAF20GP,CAF20GP=@CAF20GP,PSS20GP=@PSS20GP,GRI20GP=@GRI20GP,INLAND20GP=@INLAND20GP,ISPS20GP=@ISPS20GP,SZ20GP=@SZ20GP,AG20GP=@AG20GP,OF40GP=@OF40GP,BAF40GP=@BAF40GP,CAF40GP=@CAF40GP,PSS40GP=@PSS40GP,GRI40GP=@GRI40GP,INLAND40GP=@INLAND40GP,ISPS40GP=@ISPS40GP,SZ40GP=@SZ40GP,AG40GP=@AG40GP,OF40HQ=@OF40HQ,BAF40HQ=@BAF40HQ,CAF40HQ=@CAF40HQ,PSS40HQ=@PSS40HQ,GRI40HQ=@GRI40HQ,INLAND40HQ=@INLAND40HQ,ISPS40HQ=@ISPS40HQ,SZ40HQ=@SZ40HQ,AG40HQ=@AG40HQ,REMARK=@REMARK, MODIFIEDUSER=@MODIFIEDUSER,CARRIERCN=@CARRIERCN,BOOKINGFEE=@BOOKINGFEE,CTNFEE=@CTNFEE,THCFEE=@THCFEE,FILEFEE=@FILEFEE,LCLCOST=@LCLCOST,LCLPRICE=@LCLPRICE,CISF=@CISF,REMARK2=@REMARK2,LOCKFLAG=0,ISISSUE=0,[40RH0] = @D_40RH0,[40RH1] = @D_40RH1 ,[40RH2] = @D_40RH2 ,[40RH3] = @D_40RH3 ,PROFIT40RH1 = @PROFIT40RH1 ,PROFIT40RH2 = @PROFIT40RH2 ,PROFIT40RH3 = @PROFIT40RH3 ,OF40RH = @OF40RH ,BAF40RH = @BAF40RH ,CAF40RH = @CAF40RH ,PSS40RH = @PSS40RH ,GRI40RH = @GRI40RH ,INLAND40RH = @INLAND40RH ,ISPS40RH = @ISPS40RH ,SZ40RH = @SZ40RH ,AG40RH = @AG40RH ,PIRICEVIAPORT = @PIRICEVIAPORT,[20RS0] = @D_20RS0,[20RS1] = @D_20RS1,[20RS2] = @D_20RS2,[20RS3] = @D_20RS3,PROFIT20RS1 = @PROFIT20RS1,PROFIT20RS2 = @PROFIT20RS2,PROFIT20RS3 = @PROFIT20RS3,OF20RS = @OF20RS,BAF20RS = @BAF20RS,CAF20RS = @CAF20RS,PSS20RS = @PSS20RS,GRI20RS = @GRI20RS,INLAND20RS = @INLAND20RS,ISPS20RS = @ISPS20RS,SZ20RS = @SZ20RS,AG20RS = @AG20RS,[40NOR0] = @D_40NOR0,[40NOR1] = @D_40NOR1,[40NOR2] = @D_40NOR2,[40NOR3] = @D_40NOR3,PROFIT40NOR1 = @PROFIT40NOR1,PROFIT40NOR2 = @PROFIT40NOR2,PROFIT40NOR3 = @PROFIT40NOR3,OF40NOR = @OF40NOR,BAF40NOR = @BAF40NOR,CAF40NOR = @CAF40NOR,PSS40NOR = @PSS40NOR,GRI40NOR = @GRI40NOR,INLAND40NOR = @INLAND40NOR,ISPS40NOR = @ISPS40NOR,SZ40NOR = @SZ40NOR,AG40NOR = @AG40NOR where LANE=@LANE and CARRIER=@CARRIER and TYPE='LC' and CORPID='" + strCORPID.Trim() + "'";
SQL_UPDATE_INFO = String.Format(SQL_UPDATE_INFO, strEFFECTIVEDATE);//, strVALIDDATE
#endregion
//iResult = SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, SQL_UPDATE_INFO, parms);
SqlConnection conn = new SqlConnection(SqlHelper.ConnectionStringLocalTransaction);
iResult = SqlHelper.ExecuteNonQuery(conn, CommandType.Text, SQL_UPDATE_INFO, parms);
conn.Close();
if (iResult > 0)
{
iResult = 1;
}
else
{
iResult = -6;//更新出错crm_price_carrier
}
}
else
{
#region 生成插入语句参数
SqlParameter[] parms = new SqlParameter[]
{
new SqlParameter("@GID",SqlDbType.VarChar,36),//惟一编号
new SqlParameter("@PODLOAD",SqlDbType.VarChar,60),//起运港
new SqlParameter("@PORTDISCHARGE",SqlDbType.VarChar,60),//卸货港
new SqlParameter("@DESTINATION",SqlDbType.VarChar,60),//目的地
new SqlParameter("@CARRIER",SqlDbType.VarChar,50),//船公司
new SqlParameter("@FORWARDER",SqlDbType.VarChar,20),//订舱代理
new SqlParameter("@ETD",SqlDbType.VarChar,50),//开航日
new SqlParameter("@TT",SqlDbType.VarChar,50),//航程
new SqlParameter("@VIA",SqlDbType.VarChar,60),//中转港
new SqlParameter("@POC",SqlDbType.VarChar,100),//挂靠港
new SqlParameter("@SVC",SqlDbType.VarChar,50),//服务
new SqlParameter("@LANE",SqlDbType.VarChar,50),//航线
new SqlParameter("@CARRIERLANE",SqlDbType.VarChar,50),//船公司航线代码
new SqlParameter("@OWS",SqlDbType.VarChar,200),//超重费
new SqlParameter("@INPUTBY",SqlDbType.VarChar,36),//录入人
new SqlParameter("@COMMODITY",SqlDbType.VarChar,1024),//品名
new SqlParameter("@SC",SqlDbType.VarChar,50),//合约方
new SqlParameter("@NAMEAC",SqlDbType.VarChar,100),//合约内容
new SqlParameter("@SICUT",SqlDbType.VarChar,50),//AMS时间
new SqlParameter("@CUSCLSG",SqlDbType.VarChar,50),//截关时间
new SqlParameter("@CYCLSG",SqlDbType.VarChar,50),//操作时间
new SqlParameter("@D_20GP0",SqlDbType.Decimal),//成本价
new SqlParameter("@D_20GP1",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_20GP2",SqlDbType.Decimal),//二级售价
new SqlParameter("@D_20GP3",SqlDbType.Decimal),//三级售价
new SqlParameter("@D_40GP0",SqlDbType.Decimal),//
new SqlParameter("@D_40GP1",SqlDbType.Decimal),//
new SqlParameter("@D_40GP2",SqlDbType.Decimal),//
new SqlParameter("@D_40GP3",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ3",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ3",SqlDbType.Decimal),//
new SqlParameter("@PROFIT20GP1",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP1",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ1",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT45HQ1",SqlDbType.Decimal),// PSS售价
new SqlParameter("@OF20GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF20GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF20GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS20GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI20GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND20GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS20GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ20GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG20GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF45HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF45HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF45HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS45HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI45HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND45HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS45HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ45HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG45HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@REMARK",SqlDbType.VarChar,1024),// 备注
new SqlParameter("@MODIFIEDUSER",SqlDbType.VarChar,36),// 最后一次更新操作人GID
new SqlParameter("@CARRIERCN",SqlDbType.VarChar,100),//
new SqlParameter("@BOOKINGFEE",SqlDbType.VarChar,50),//
new SqlParameter("@CTNFEE",SqlDbType.VarChar,50),//
new SqlParameter("@THCFEE",SqlDbType.VarChar,50),//
new SqlParameter("@FILEFEE",SqlDbType.VarChar,50),//
new SqlParameter("@LCLCOST",SqlDbType.VarChar,50),//
new SqlParameter("@LCLPRICE",SqlDbType.VarChar,50),//
new SqlParameter("@CISF",SqlDbType.VarChar,50),//
new SqlParameter("@REMARK2",SqlDbType.VarChar,1024),//
new SqlParameter("@CORPID",SqlDbType.VarChar,36),
new SqlParameter("@D_40RH0", SqlDbType.Decimal,9),
new SqlParameter("@D_40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@OF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@BAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@CAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PSS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@GRI40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@INLAND40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@ISPS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@SZ40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@AG40RH", SqlDbType.Decimal,9),
new SqlParameter("@PIRICEVIAPORT",SqlDbType.VarChar,60),
new SqlParameter("@D_20RS0", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS1", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS2", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS3", SqlDbType.Decimal,9),
new SqlParameter("@OF20RS", SqlDbType.Decimal,9),
new SqlParameter("@BAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@CAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@PSS20RS", SqlDbType.Decimal,9),
new SqlParameter("@GRI20RS", SqlDbType.Decimal,9),
new SqlParameter("@INLAND20RS", SqlDbType.Decimal,9),
new SqlParameter("@ISPS20RS", SqlDbType.Decimal,9),
new SqlParameter("@SZ20RS", SqlDbType.Decimal,9),
new SqlParameter("@AG20RS", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR0", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@OF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@BAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@CAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@PSS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@GRI40NOR", SqlDbType.Decimal,9),
new SqlParameter("@INLAND40NOR", SqlDbType.Decimal,9),
new SqlParameter("@ISPS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@SZ40NOR", SqlDbType.Decimal,9),
new SqlParameter("@AG40NOR", SqlDbType.Decimal,9)
};
#endregion
#region 获取参数
parms[0].Value = getBSNO();//惟一编号
parms[1].Value = strPORTLOAD;//起运港
parms[2].Value = "";//卸货港
parms[3].Value = "";//目的地
parms[4].Value = myRow["CARRIER"] == null ? "" : myRow["CARRIER"].ToString().Trim();//船公司
parms[5].Value = "";//订舱代理
parms[6].Value = "";//开航日
parms[7].Value = "";//航程
parms[8].Value = "";//中转港
parms[9].Value = "";//挂靠港
parms[10].Value = "";//服务
parms[11].Value = myRow["LANE"] == null ? "" : myRow["LANE"].ToString().Trim();//航线
parms[12].Value = "";//船公司航线代码
parms[13].Value = "";//超重费
parms[14].Value = strUserID;//录入人
parms[15].Value = "";//品名
parms[16].Value = "";//合约方
parms[17].Value = "";//合约内容
parms[18].Value = "";//AMS时间
parms[19].Value = "";//截关时间
parms[20].Value = "";//操作时间
parms[21].Value = 0;// 成本价
parms[22].Value = 0;// 一级售价
parms[23].Value = 0;//二级售价
parms[24].Value = 0;//三级售价
parms[25].Value = 0;//
parms[26].Value = 0;//
parms[27].Value = 0;//
parms[28].Value = 0;//
parms[29].Value = 0;//
parms[30].Value = 0;//
parms[31].Value = 0;//
parms[32].Value = 0;//
parms[33].Value = 0;//
parms[34].Value = 0;//
parms[35].Value = 0;//
parms[36].Value = 0;//
parms[37].Value = 0;// OF售价
parms[38].Value = 0;// BAF售价
parms[39].Value = 0;// CAF售价
parms[40].Value = 0;// PSS售价
parms[41].Value = 0;// OF售价
parms[42].Value = 0;// BAF售价
parms[43].Value = 0;// CAF售价
parms[44].Value = 0;// PSS售价
parms[45].Value = 0;// GRI售价
parms[46].Value = 0;// INLAND售价
parms[47].Value = 0;// ISPS售价
parms[48].Value = 0;// SZ售价
parms[49].Value = 0;// AG售价
parms[50].Value = 0;// OF售价
parms[51].Value = 0;// BAF售价
parms[52].Value = 0;// CAF售价
parms[53].Value = 0;// PSS售价
parms[54].Value = 0;// GRI售价
parms[55].Value = 0;// INLAND售价
parms[56].Value = 0;// ISPS售价
parms[57].Value = 0;// SZ售价
parms[58].Value = 0;// AG售价
parms[59].Value = 0;// OF售价
parms[60].Value = 0;// BAF售价
parms[61].Value = 0;// CAF售价
parms[62].Value = 0;// PSS售价
parms[63].Value = 0;// GRI售价
parms[64].Value = 0;// INLAND售价
parms[65].Value = 0;// ISPS售价
parms[66].Value = 0;// SZ售价
parms[67].Value = 0;// AG售价
parms[68].Value = 0;//OF售价"
parms[69].Value = 0;//BAF售价"
parms[70].Value = 0;//CAF售价"
parms[71].Value = 0;//PSS售价"
parms[72].Value = 0;//GRI售价"
parms[73].Value = 0;//INLAND售价"
parms[74].Value = 0;//ISPS售价"
parms[75].Value = 0;//SZ售价"
parms[76].Value = 0;//AG售价"
parms[77].Value = myRow["REMARK"] == null ? "" : myRow["REMARK"].ToString().Trim();// 备注
parms[78].Value = strUserID;//
parms[79].Value = myRow["CARRIERCN"] == null ? "" : myRow["CARRIERCN"].ToString().Trim();//船公司中文名CARRIERCN
parms[80].Value = myRow["BOOKINGFEE"] == null ? "" : myRow["BOOKINGFEE"].ToString().Trim();//订舱费 BOOKINGFEE
parms[81].Value = myRow["CTNFEE"] == null ? "" : myRow["CTNFEE"].ToString().Trim();//箱封费 CTNFEE;//
parms[82].Value = myRow["THCFEE"] == null ? "" : myRow["THCFEE"].ToString().Trim();//THC THCFEE;//
parms[83].Value = myRow["FILEFEE"] == null ? "" : myRow["FILEFEE"].ToString().Trim();//文件费 FILEFEE;//
parms[84].Value = "";// LCLCOST
parms[85].Value = "";// LCLPRICE
parms[86].Value = "";// CISF
parms[87].Value = myRow["REMARK2"] == null ? "" : myRow["REMARK2"].ToString().Trim();// 备注2
parms[88].Value = strCORPID.Trim();
parms[89].Value = 0;
parms[90].Value = 0;
parms[91].Value = 0;
parms[92].Value = 0;
parms[93].Value = 0;
parms[94].Value = 0;
parms[95].Value = 0;
parms[96].Value = 0;
parms[97].Value = 0;
parms[98].Value = 0;
parms[99].Value = 0;
parms[100].Value = 0;
parms[101].Value = 0;
parms[102].Value = 0;
parms[103].Value = 0;
parms[104].Value = 0;
//生效期
string strEFFECTIVEDATE = ""; ;
string strEFFECTIVEDATE_name = "";
if (!myRow["EFFECTIVEDATE"].ToString().Trim().Equals(""))
{
strEFFECTIVEDATE = "'" + myRow["EFFECTIVEDATE"].ToString().Trim() + "',";
strEFFECTIVEDATE_name = "EFFECTIVEDATE,";
}
//
//有效期
//string strVALIDDATE = ""; ;
//string strVALIDDATE_name = "";
//if (!myRow["VALIDDATE"].ToString().Trim().Equals(""))
//{
// strVALIDDATE = "'" + myRow["VALIDDATE"].ToString().Trim() + "',";
// strVALIDDATE_name = "VALIDDATE,";
//}
//
string SQL_INSERT_INFO = "insert into crm_price_carrier(GID,LOCKFLAG,PODLOAD,PORTDISCHARGE,DESTINATION,CARRIER,FORWARDER,ETD,TT,VIA,POC,SVC,LANE,CARRIERLANE,OWS,{0}INPUTBY,COMMODITY,SC,NAMEAC,SICUT,CUSCLSG,CYCLSG,[20GP0],[20GP1],[20GP2],[20GP3],[40GP0],[40GP1],[40GP2],[40GP3],[40HQ0],[40HQ1],[40HQ2],[40HQ3],[45HQ0],[45HQ1],[45HQ2],[45HQ3],ISISSUE,PROFIT20GP1,PROFIT40GP1,PROFIT40HQ1,PROFIT45HQ1,OF20GP,BAF20GP,CAF20GP,PSS20GP,GRI20GP,INLAND20GP,ISPS20GP,SZ20GP,AG20GP,OF40GP,BAF40GP,CAF40GP,PSS40GP,GRI40GP,INLAND40GP,ISPS40GP,SZ40GP,AG40GP,OF40HQ,BAF40HQ,CAF40HQ,PSS40HQ,GRI40HQ,INLAND40HQ,ISPS40HQ,SZ40HQ,AG40HQ,OF45HQ,BAF45HQ,CAF45HQ,PSS45HQ,GRI45HQ,INLAND45HQ,ISPS45HQ,SZ45HQ,AG45HQ,REMARK,MODIFIEDUSER,CARRIERCN,BOOKINGFEE,CTNFEE,THCFEE,FILEFEE,LCLCOST,LCLPRICE,CISF,REMARK2,TYPE,CORPID,[40RH0],[40RH1],[40RH2],[40RH3],PROFIT40RH1,PROFIT40RH2,PROFIT40RH3,OF40RH,BAF40RH,CAF40RH,PSS40RH,GRI40RH,INLAND40RH,ISPS40RH,SZ40RH,AG40RH,PIRICEVIAPORT,[20RS0],[20RS1],[20RS2],[20RS3],[PROFIT20RS1],[PROFIT20RS2],[PROFIT20RS3],[OF20RS],[BAF20RS],[CAF20RS],[PSS20RS],[GRI20RS],[INLAND20RS],[ISPS20RS],[SZ20RS],[AG20RS],[40NOR0],[40NOR1],[40NOR2],[40NOR3],[PROFIT40NOR1],[PROFIT40NOR2],[PROFIT40NOR3],[OF40NOR],[BAF40NOR],[CAF40NOR],[PSS40NOR],[GRI40NOR],[INLAND40NOR],[ISPS40NOR],[SZ40NOR],[AG40NOR]) "
+ " values(@GID,0,@PODLOAD,@PORTDISCHARGE,@DESTINATION,@CARRIER,@FORWARDER,@ETD,@TT,@VIA,@POC,@SVC,@LANE,@CARRIERLANE,@OWS,{1}@INPUTBY,@COMMODITY,@SC,@NAMEAC,@SICUT,@CUSCLSG,@CYCLSG,@D_20GP0,@D_20GP1,@D_20GP2,@D_20GP3,@D_40GP0,@D_40GP1,@D_40GP2,@D_40GP3,@D_40HQ0,@D_40HQ1,@D_40HQ2,@D_40HQ3,@D_45HQ0,@D_45HQ1,@D_45HQ2,@D_45HQ3,0,@PROFIT20GP1,@PROFIT40GP1,@PROFIT40HQ1,@PROFIT45HQ1,@OF20GP,@BAF20GP,@CAF20GP,@PSS20GP,@GRI20GP,@INLAND20GP,@ISPS20GP,@SZ20GP,@AG20GP,@OF40GP,@BAF40GP,@CAF40GP,@PSS40GP,@GRI40GP,@INLAND40GP,@ISPS40GP,@SZ40GP,@AG40GP,@OF40HQ,@BAF40HQ,@CAF40HQ,@PSS40HQ,@GRI40HQ,@INLAND40HQ,@ISPS40HQ,@SZ40HQ,@AG40HQ,@OF45HQ,@BAF45HQ,@CAF45HQ,@PSS45HQ,@GRI45HQ,@INLAND45HQ,@ISPS45HQ,@SZ45HQ,@AG45HQ,@REMARK,@MODIFIEDUSER,@CARRIERCN,@BOOKINGFEE,@CTNFEE,@THCFEE,@FILEFEE,@LCLCOST,@LCLPRICE,@CISF,@REMARK2,'LC',@CORPID,@D_40RH0,@D_40RH1,@D_40RH2,@D_40RH3,@PROFIT40RH1,@PROFIT40RH2,@PROFIT40RH3,@OF40RH,@BAF40RH,@CAF40RH,@PSS40RH,@GRI40RH,@INLAND40RH,@ISPS40RH,@SZ40RH,@AG40RH,@PIRICEVIAPORT,@D_20RS0,@D_20RS1,@D_20RS2,@D_20RS3,@PROFIT20RS1,@PROFIT20RS2,@PROFIT20RS3,@OF20RS,@BAF20RS,@CAF20RS,@PSS20RS,@GRI20RS,@INLAND20RS,@ISPS20RS,@SZ20RS,@AG20RS,@D_40NOR0,@D_40NOR1,@D_40NOR2,@D_40NOR3,@PROFIT40NOR1,@PROFIT40NOR2,@PROFIT40NOR3,@OF40NOR,@BAF40NOR,@CAF40NOR,@PSS40NOR,@GRI40NOR,@INLAND40NOR,@ISPS40NOR,@SZ40NOR,@AG40NOR)";
//
SQL_INSERT_INFO = String.Format(SQL_INSERT_INFO, strEFFECTIVEDATE_name, strEFFECTIVEDATE);//, strVALIDDATE_name, strVALIDDATE
#endregion
//iResult = SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, SQL_INSERT_INFO, parms);
SqlConnection conn = new SqlConnection(SqlHelper.ConnectionStringLocalTransaction);
iResult = SqlHelper.ExecuteNonQuery(conn, CommandType.Text, SQL_INSERT_INFO, parms);
conn.Close();
if (iResult > 0)
{
iResult = 1;
}
else
{
iResult = -7;//插入失败
}
}
}
else
{
iResult = -1;
}
iResult = 1;//状态为1表示插入成功
}
catch (Exception execError)
{
iResult = -1;//有异常,插入失败
iResult = -2;//插入异常,事务已回滚成功
throw execError;
}
}
else
{
iResult = -9;//无符合条件的数据
}
}
}
}
else
{
iResult = -1;
}
return iResult;
}
/// <summary>
/// 海运拼箱运价
/// </summary>
/// <param name="dsexcel"></param>
/// <param name="strUserID"></param>
/// <returns></returns>
public int InsertInfoExcelLCL(DataSet dsexcel, string strUserID,string strCORPID)
{
T_ALL_DA T_ALL_DA = new T_ALL_DA();
int iResult = 0;
string strPORTLOAD = T_ALL_DA.GetStrSQL("PORTLOAD", "select PORTLOAD from subcomp_seae_def where CORPID=(select GID from company where GID=(select COMPANYID from user_company where USERID='" + strUserID + "') and ISDELETED=0 and ISDISABLE=0)");//起运港
//
if (dsexcel.Tables[0].Rows.Count > 0)
{
foreach (DataTable myTable in dsexcel.Tables)
{
foreach (DataRow myRow in myTable.Rows)//遍历表
{
if (myRow["FLAG"].ToString().Trim().Equals("Y"))
{
try
{
string strDESTINATION = myRow["DESTINATION"] == null ? "" : myRow["DESTINATION"].ToString().Trim();//目的港
string strCARRIER = myRow["CARRIER"] == null ? "" : myRow["CARRIER"].ToString().Trim();//船公司
//string strETD = myRow["ETD"] == null ? "" : myRow["ETD"].ToString().Trim();//开航日
//string strTT = myRow["TT"] == null ? "" : myRow["TT"].ToString().Trim();//航程
//string strVIA = myRow["VIA"] == null ? "" : myRow["VIA"].ToString().Trim();//中转港
//string strCARRIERLANE = myRow["CARRIERLANE"] == null ? "" : myRow["CARRIERLANE"].ToString().Trim();//船公司航线代码
//string strSVC = myRow["SVC"] == null ? "" : myRow["SVC"].ToString().Trim();//服务
//string strCOMMODITY = myRow["COMMODITY"] == null ? "" : myRow["COMMODITY"].ToString().Trim();//品名
string strSQL = "select GID,LOCKFLAG,PODLOAD,PORTDISCHARGE,DESTINATION,CARRIER,FORWARDER,ETD,TT,VIA,POC,SVC,LANE,CARRIERLANE,OWS,VALIDDATE,EFFECTIVEDATE,INPUTBY,INPUTTIME,MODIFYTIME,COMMODITY,SC,NAMEAC,SICUT,CUSCLSG,CYCLSG,[20GP0],[20GP1],[20GP2],[20GP3],[40GP0],[40GP1],[40GP2],[40GP3],[40HQ0],[40HQ1],[40HQ2],[40HQ3],[45HQ0],[45HQ1],[45HQ2],[45HQ3],MODIFIEDUSER,ISISSUE,PROFIT20GP1,PROFIT40GP1,PROFIT40HQ1,PROFIT45HQ1,OF20GP,BAF20GP,CAF20GP,PSS20GP,GRI20GP,INLAND20GP,ISPS20GP,SZ20GP,AG20GP,OF40GP,BAF40GP,CAF40GP,PSS40GP,GRI40GP,INLAND40GP,ISPS40GP,SZ40GP,AG40GP,OF40HQ,BAF40HQ,CAF40HQ,PSS40HQ,GRI40HQ,INLAND40HQ,ISPS40HQ,SZ40HQ,AG40HQ,OF45HQ,BAF45HQ,CAF45HQ,PSS45HQ,GRI45HQ,INLAND45HQ,ISPS45HQ,SZ45HQ,AG45HQ,REMARK,CARRIERCN,BOOKINGFEE,CTNFEE,THCFEE,FILEFEE,LCLCOST,LCLPRICE,CISF,REMARK2,CORPID,[40RH0],[40RH1],[40RH2],[40RH3],PROFIT40RH1,PROFIT40RH2,PROFIT40RH3,OF40RH,BAF40RH,CAF40RH,PSS40RH,GRI40RH,INLAND40RH,ISPS40RH,SZ40RH,AG40RH,PIRICEVIAPORT,[20RS0],[20RS1],[20RS2],[20RS3],[PROFIT20RS1],[PROFIT20RS2],[PROFIT20RS3],[OF20RS],[BAF20RS],[CAF20RS],[PSS20RS],[GRI20RS],[INLAND20RS],[ISPS20RS],[SZ20RS],[AG20RS],[40NOR0],[40NOR1],[40NOR2],[40NOR3],[PROFIT40NOR1],[PROFIT40NOR2],[PROFIT40NOR3],[OF40NOR],[BAF40NOR],[CAF40NOR],[PSS40NOR],[GRI40NOR],[INLAND40NOR],[ISPS40NOR],[SZ40NOR],[AG40NOR] from crm_price_carrier where DESTINATION='" + strDESTINATION + "' and CARRIER='" + strCARRIER + "' and TYPE='LCL' and CORPID='" + strCORPID.Trim() + "'";
DataSet ds = SqlHelper.OpenSqlDataSet(SqlHelper.ConnectionStringLocalTransaction, strSQL);
if (ds != null)
{
if (ds.Tables[0].Rows.Count > 0)
{
#region 生成更新语句参数
SqlParameter[] parms = new SqlParameter[]
{
new SqlParameter("@PORTDISCHARGE",SqlDbType.VarChar,60),//卸货港
new SqlParameter("@CARRIER",SqlDbType.VarChar,50),//船公司
new SqlParameter("@ETD",SqlDbType.VarChar,50),//开航日
new SqlParameter("@TT",SqlDbType.VarChar,50),//航程
new SqlParameter("@VIA",SqlDbType.VarChar,60),//中转港
new SqlParameter("@POC",SqlDbType.VarChar,100),//挂靠港
new SqlParameter("@SVC",SqlDbType.VarChar,50),//服务
new SqlParameter("@LANE",SqlDbType.VarChar,50),//航线
new SqlParameter("@CARRIERLANE",SqlDbType.VarChar,50),//船公司航线代码
new SqlParameter("@OWS",SqlDbType.VarChar,200),//超重费
new SqlParameter("@COMMODITY",SqlDbType.VarChar,1024),//品名
new SqlParameter("@D_20GP0",SqlDbType.Decimal),//成本价
new SqlParameter("@D_20GP1",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_40GP0",SqlDbType.Decimal),//
new SqlParameter("@D_40GP1",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ1",SqlDbType.Decimal),//
new SqlParameter("@PROFIT20GP1",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP1",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ1",SqlDbType.Decimal),// CAF售价
new SqlParameter("@OF20GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF20GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF20GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS20GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI20GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND20GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS20GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ20GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG20GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@REMARK",SqlDbType.VarChar,1024),// 备注
new SqlParameter("@MODIFIEDUSER",SqlDbType.VarChar,36),// 最后一次更新操作人GID
new SqlParameter("@CARRIERCN",SqlDbType.VarChar,100),//
new SqlParameter("@BOOKINGFEE",SqlDbType.VarChar,50),//
new SqlParameter("@CTNFEE",SqlDbType.VarChar,50),//
new SqlParameter("@THCFEE",SqlDbType.VarChar,50),//
new SqlParameter("@FILEFEE",SqlDbType.VarChar,50),//
new SqlParameter("@LCLCOST",SqlDbType.VarChar,50),//
new SqlParameter("@LCLPRICE",SqlDbType.VarChar,50),//
new SqlParameter("@CISF",SqlDbType.VarChar,50),//
new SqlParameter("@REMARK2",SqlDbType.VarChar,1024),//
new SqlParameter("@DESTINATION",SqlDbType.VarChar,60),//
new SqlParameter("@CORPID",SqlDbType.VarChar,36),
new SqlParameter("@D_40RH0", SqlDbType.Decimal,9),
new SqlParameter("@D_40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@OF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@BAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@CAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PSS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@GRI40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@INLAND40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@ISPS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@SZ40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@AG40RH", SqlDbType.Decimal,9),
new SqlParameter("@PIRICEVIAPORT",SqlDbType.VarChar,60),
new SqlParameter("@D_20RS0", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS1", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS2", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS3", SqlDbType.Decimal,9),
new SqlParameter("@OF20RS", SqlDbType.Decimal,9),
new SqlParameter("@BAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@CAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@PSS20RS", SqlDbType.Decimal,9),
new SqlParameter("@GRI20RS", SqlDbType.Decimal,9),
new SqlParameter("@INLAND20RS", SqlDbType.Decimal,9),
new SqlParameter("@ISPS20RS", SqlDbType.Decimal,9),
new SqlParameter("@SZ20RS", SqlDbType.Decimal,9),
new SqlParameter("@AG20RS", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR0", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@OF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@BAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@CAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@PSS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@GRI40NOR", SqlDbType.Decimal,9),
new SqlParameter("@INLAND40NOR", SqlDbType.Decimal,9),
new SqlParameter("@ISPS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@SZ40NOR", SqlDbType.Decimal,9),
new SqlParameter("@AG40NOR", SqlDbType.Decimal,9)
};
#endregion
#region 获取参数
parms[0].Value = myRow["DESTINATION"] == null ? "" : myRow["DESTINATION"].ToString().Trim();//卸货港
parms[1].Value = myRow["CARRIER"] == null ? "" : myRow["CARRIER"].ToString().Trim();//船公司
parms[2].Value = myRow["ETD"] == null ? "" : myRow["ETD"].ToString().Trim();//开航日
parms[3].Value = myRow["TT"] == null ? "" : myRow["TT"].ToString().Trim();//航程
parms[4].Value = myRow["VIA"] == null ? "" : myRow["VIA"].ToString().Trim();//中转港
parms[5].Value = "";//挂靠港
parms[6].Value = "";//服务
parms[7].Value = myRow["LANE"] == null ? "" : myRow["LANE"].ToString().Trim();//航线
parms[8].Value = "";//船公司航线代码
parms[9].Value = "";//超重费
parms[10].Value = "";//品名
parms[11].Value = 0;// 成本价
parms[12].Value = 0;// 一级售价
parms[13].Value = 0;//
parms[14].Value = 0;//
parms[15].Value = 0;//
parms[16].Value = 0;//
parms[17].Value = 0;// OF售价
parms[18].Value = 0;// BAF售价
parms[19].Value = 0;// CAF售价
parms[20].Value = 0;// OF售价
parms[21].Value = 0;// BAF售价
parms[22].Value = 0;// CAF售价
parms[23].Value = 0;// PSS售价
parms[24].Value = 0;// GRI售价
parms[25].Value = 0;// INLAND售价
parms[26].Value = 0;// ISPS售价
parms[27].Value = 0;// SZ售价
parms[28].Value = 0;// AG售价
parms[29].Value = 0;// OF售价
parms[30].Value = 0;// BAF售价
parms[31].Value = 0;// CAF售价
parms[32].Value = 0;// PSS售价
parms[33].Value = 0;// GRI售价
parms[34].Value = 0;// INLAND售价
parms[35].Value = 0;// ISPS售价
parms[36].Value = 0;// SZ售价
parms[37].Value = 0;// AG售价
parms[38].Value = 0;// OF售价
parms[39].Value = 0;// BAF售价
parms[40].Value = 0;// CAF售价
parms[41].Value = 0;// PSS售价
parms[42].Value = 0;// GRI售价
parms[43].Value = 0;// INLAND售价
parms[44].Value = 0;// ISPS售价
parms[45].Value = 0;// SZ售价
parms[46].Value = 0;// AG售价
parms[47].Value = myRow["REMARK"] == null ? "" : myRow["REMARK"].ToString().Trim();// 备注
parms[48].Value = strUserID;//
parms[49].Value = "";//CARRIERCN
parms[50].Value = "";//BOOKINGFEE;//
parms[51].Value = "";//CTNFEE;//
parms[52].Value = "";//THCFEE;//
parms[53].Value = "";//FILEFEE;//
parms[54].Value = myRow["LCLCOST"].ToString().Trim() == null ? "" : myRow["LCLCOST"].ToString().Trim();// CISF
parms[55].Value = myRow["LCLPRICE"].ToString().Trim() == null ? "" : myRow["LCLPRICE"].ToString().Trim();// CISF
parms[56].Value = myRow["CISF"].ToString().Trim() == null ? "" : myRow["CISF"].ToString().Trim();// CISF
parms[57].Value = myRow["REMARK2"] == null ? "" : myRow["REMARK2"].ToString().Trim();// 备注2
parms[58].Value = myRow["DESTINATION"] == null ? "" : myRow["DESTINATION"].ToString().Trim();// 目的地
parms[59].Value = 0;
parms[60].Value = 0;
parms[61].Value = 0;
parms[62].Value = 0;
parms[63].Value = 0;
parms[64].Value = 0;
parms[65].Value = 0;
parms[66].Value = 0;
parms[67].Value = 0;
parms[68].Value = 0;
parms[69].Value = 0;
parms[70].Value = 0;
parms[71].Value = 0;
parms[72].Value = 0;
parms[73].Value = 0;
parms[74].Value = 0;
parms[75].Value = myRow["PIRICEVIAPORT"] == null ? "" : myRow["PIRICEVIAPORT"].ToString().Trim();//中转港
//生效期
string strEFFECTIVEDATE = "EFFECTIVEDATE=null,";
if (!myRow["EFFECTIVEDATE"].ToString().Trim().Equals(""))
{
strEFFECTIVEDATE = "EFFECTIVEDATE='" + myRow["EFFECTIVEDATE"].ToString().Trim() + "',";
}
//有效期
//string strVALIDDATE = "VALIDDATE=null,";
//if (!myRow["VALIDDATE"].ToString().Trim().Equals(""))
//{
// strVALIDDATE = "VALIDDATE='" + myRow["VALIDDATE"].ToString().Trim() + "',";
//}
string SQL_UPDATE_INFO = "update crm_price_carrier set VIA=@VIA,POC=@POC,SVC=@SVC,LANE=@LANE,CARRIERLANE=@CARRIERLANE,OWS=@OWS,{0}COMMODITY=@COMMODITY,[20GP0]=@D_20GP0,[20GP1]=@D_20GP1,[40GP0]=@D_40GP0,[40GP1]=@D_40GP1,[40HQ0]=@D_40HQ0,[40HQ1]=@D_40HQ1,MODIFYTIME=getdate(),PROFIT20GP1=@PROFIT20GP1,PROFIT40GP1=@PROFIT40GP1,PROFIT40HQ1=@PROFIT40HQ1,OF20GP=@OF20GP,BAF20GP=@BAF20GP,CAF20GP=@CAF20GP,PSS20GP=@PSS20GP,GRI20GP=@GRI20GP,INLAND20GP=@INLAND20GP,ISPS20GP=@ISPS20GP,SZ20GP=@SZ20GP,AG20GP=@AG20GP,OF40GP=@OF40GP,BAF40GP=@BAF40GP,CAF40GP=@CAF40GP,PSS40GP=@PSS40GP,GRI40GP=@GRI40GP,INLAND40GP=@INLAND40GP,ISPS40GP=@ISPS40GP,SZ40GP=@SZ40GP,AG40GP=@AG40GP,OF40HQ=@OF40HQ,BAF40HQ=@BAF40HQ,CAF40HQ=@CAF40HQ,PSS40HQ=@PSS40HQ,GRI40HQ=@GRI40HQ,INLAND40HQ=@INLAND40HQ,ISPS40HQ=@ISPS40HQ,SZ40HQ=@SZ40HQ,AG40HQ=@AG40HQ,REMARK=@REMARK, MODIFIEDUSER=@MODIFIEDUSER,CARRIERCN=@CARRIERCN,BOOKINGFEE=@BOOKINGFEE,CTNFEE=@CTNFEE,THCFEE=@THCFEE,FILEFEE=@FILEFEE,LCLCOST=@LCLCOST,LCLPRICE=@LCLPRICE,CISF=@CISF,REMARK2=@REMARK2,LOCKFLAG=0,ISISSUE=0,[40RH0] = @D_40RH0,[40RH1] = @D_40RH1 ,[40RH2] = @D_40RH2 ,[40RH3] = @D_40RH3 ,PROFIT40RH1 = @PROFIT40RH1 ,PROFIT40RH2 = @PROFIT40RH2 ,PROFIT40RH3 = @PROFIT40RH3 ,OF40RH = @OF40RH ,BAF40RH = @BAF40RH ,CAF40RH = @CAF40RH ,PSS40RH = @PSS40RH ,GRI40RH = @GRI40RH ,INLAND40RH = @INLAND40RH ,ISPS40RH = @ISPS40RH ,SZ40RH = @SZ40RH ,AG40RH = @AG40RH,PIRICEVIAPORT = @PIRICEVIAPORT,[20RS0] = @D_20RS0,[20RS1] = @D_20RS1,[20RS2] = @D_20RS2,[20RS3] = @D_20RS3,PROFIT20RS1 = @PROFIT20RS1,PROFIT20RS2 = @PROFIT20RS2,PROFIT20RS3 = @PROFIT20RS3,OF20RS = @OF20RS,BAF20RS = @BAF20RS,CAF20RS = @CAF20RS,PSS20RS = @PSS20RS,GRI20RS = @GRI20RS,INLAND20RS = @INLAND20RS,ISPS20RS = @ISPS20RS,SZ20RS = @SZ20RS,AG20RS = @AG20RS,[40NOR0] = @D_40NOR0,[40NOR1] = @D_40NOR1,[40NOR2] = @D_40NOR2,[40NOR3] = @D_40NOR3,PROFIT40NOR1 = @PROFIT40NOR1,PROFIT40NOR2 = @PROFIT40NOR2,PROFIT40NOR3 = @PROFIT40NOR3,OF40NOR = @OF40NOR,BAF40NOR = @BAF40NOR,CAF40NOR = @CAF40NOR,PSS40NOR = @PSS40NOR,GRI40NOR = @GRI40NOR,INLAND40NOR = @INLAND40NOR,ISPS40NOR = @ISPS40NOR,SZ40NOR = @SZ40NOR,AG40NOR = @AG40NOR where DESTINATION=@DESTINATION and CARRIER=@CARRIER and TYPE='LCL' and CORPID='" + strCORPID.Trim() + "'";
SQL_UPDATE_INFO = String.Format(SQL_UPDATE_INFO, strEFFECTIVEDATE);//, strVALIDDATE
#endregion
//iResult = SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, SQL_UPDATE_INFO, parms);
SqlConnection conn = new SqlConnection(SqlHelper.ConnectionStringLocalTransaction);
iResult = SqlHelper.ExecuteNonQuery(conn, CommandType.Text, SQL_UPDATE_INFO, parms);
conn.Close();
if (iResult > 0)
{
iResult = 1;
}
else
{
iResult = -6;//更新出错crm_price_carrier
}
}
else
{
#region 生成插入语句参数
SqlParameter[] parms = new SqlParameter[]
{
new SqlParameter("@GID",SqlDbType.VarChar,36),//惟一编号
new SqlParameter("@PODLOAD",SqlDbType.VarChar,60),//起运港
new SqlParameter("@PORTDISCHARGE",SqlDbType.VarChar,60),//卸货港
new SqlParameter("@DESTINATION",SqlDbType.VarChar,60),//目的地
new SqlParameter("@CARRIER",SqlDbType.VarChar,50),//船公司
new SqlParameter("@FORWARDER",SqlDbType.VarChar,20),//订舱代理
new SqlParameter("@ETD",SqlDbType.VarChar,50),//开航日
new SqlParameter("@TT",SqlDbType.VarChar,50),//航程
new SqlParameter("@VIA",SqlDbType.VarChar,60),//中转港
new SqlParameter("@POC",SqlDbType.VarChar,100),//挂靠港
new SqlParameter("@SVC",SqlDbType.VarChar,50),//服务
new SqlParameter("@LANE",SqlDbType.VarChar,50),//航线
new SqlParameter("@CARRIERLANE",SqlDbType.VarChar,50),//船公司航线代码
new SqlParameter("@OWS",SqlDbType.VarChar,200),//超重费
new SqlParameter("@INPUTBY",SqlDbType.VarChar,36),//录入人
new SqlParameter("@COMMODITY",SqlDbType.VarChar,1024),//品名
new SqlParameter("@SC",SqlDbType.VarChar,50),//合约方
new SqlParameter("@NAMEAC",SqlDbType.VarChar,100),//合约内容
new SqlParameter("@SICUT",SqlDbType.VarChar,50),//AMS时间
new SqlParameter("@CUSCLSG",SqlDbType.VarChar,50),//截关时间
new SqlParameter("@CYCLSG",SqlDbType.VarChar,50),//操作时间
new SqlParameter("@D_20GP0",SqlDbType.Decimal),//成本价
new SqlParameter("@D_20GP1",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_20GP2",SqlDbType.Decimal),//二级售价
new SqlParameter("@D_20GP3",SqlDbType.Decimal),//三级售价
new SqlParameter("@D_40GP0",SqlDbType.Decimal),//
new SqlParameter("@D_40GP1",SqlDbType.Decimal),//
new SqlParameter("@D_40GP2",SqlDbType.Decimal),//
new SqlParameter("@D_40GP3",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ3",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ3",SqlDbType.Decimal),//
new SqlParameter("@PROFIT20GP1",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP1",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ1",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT45HQ1",SqlDbType.Decimal),// PSS售价
new SqlParameter("@OF20GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF20GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF20GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS20GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI20GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND20GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS20GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ20GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG20GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF45HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF45HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF45HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS45HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI45HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND45HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS45HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ45HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG45HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@REMARK",SqlDbType.VarChar,1024),// 备注
new SqlParameter("@MODIFIEDUSER",SqlDbType.VarChar,36),// 最后一次更新操作人GID
new SqlParameter("@CARRIERCN",SqlDbType.VarChar,100),//
new SqlParameter("@BOOKINGFEE",SqlDbType.VarChar,50),//
new SqlParameter("@CTNFEE",SqlDbType.VarChar,50),//
new SqlParameter("@THCFEE",SqlDbType.VarChar,50),//
new SqlParameter("@FILEFEE",SqlDbType.VarChar,50),//
new SqlParameter("@LCLCOST",SqlDbType.VarChar,50),//
new SqlParameter("@LCLPRICE",SqlDbType.VarChar,50),//
new SqlParameter("@CISF",SqlDbType.VarChar,50),//
new SqlParameter("@REMARK2",SqlDbType.VarChar,1024),//
new SqlParameter("@CORPID",SqlDbType.VarChar,36),//
new SqlParameter("@D_40RH0", SqlDbType.Decimal,9),
new SqlParameter("@D_40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@OF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@BAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@CAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PSS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@GRI40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@INLAND40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@ISPS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@SZ40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@AG40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PIRICEVIAPORT",SqlDbType.VarChar,60),
new SqlParameter("@D_20RS0", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS1", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS2", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS3", SqlDbType.Decimal,9),
new SqlParameter("@OF20RS", SqlDbType.Decimal,9),
new SqlParameter("@BAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@CAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@PSS20RS", SqlDbType.Decimal,9),
new SqlParameter("@GRI20RS", SqlDbType.Decimal,9),
new SqlParameter("@INLAND20RS", SqlDbType.Decimal,9),
new SqlParameter("@ISPS20RS", SqlDbType.Decimal,9),
new SqlParameter("@SZ20RS", SqlDbType.Decimal,9),
new SqlParameter("@AG20RS", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR0", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@OF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@BAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@CAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@PSS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@GRI40NOR", SqlDbType.Decimal,9),
new SqlParameter("@INLAND40NOR", SqlDbType.Decimal,9),
new SqlParameter("@ISPS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@SZ40NOR", SqlDbType.Decimal,9),
new SqlParameter("@AG40NOR", SqlDbType.Decimal,9)
};
#endregion
#region 获取参数
parms[0].Value = getBSNO();//惟一编号
parms[1].Value = strPORTLOAD;//起运港
parms[2].Value = myRow["DESTINATION"] == null ? "" : myRow["DESTINATION"].ToString().Trim();//卸货港
parms[3].Value = myRow["DESTINATION"] == null ? "" : myRow["DESTINATION"].ToString().Trim();//目的地
parms[4].Value = myRow["CARRIER"] == null ? "" : myRow["CARRIER"].ToString().Trim();//船公司
parms[5].Value = "";//订舱代理
parms[6].Value = myRow["ETD"] == null ? "" : myRow["ETD"].ToString().Trim();//开航日
parms[7].Value = myRow["TT"] == null ? "" : myRow["TT"].ToString().Trim();//航程
parms[8].Value = myRow["VIA"] == null ? "" : myRow["VIA"].ToString().Trim();//中转港
parms[9].Value = "";//挂靠港
parms[10].Value = "";//服务
parms[11].Value = myRow["LANE"] == null ? "" : myRow["LANE"].ToString().Trim();//航线
parms[12].Value = "";//船公司航线代码
parms[13].Value = "";//超重费
parms[14].Value = strUserID;//录入人
parms[15].Value = "";//品名
parms[16].Value = "";//合约方
parms[17].Value = "";//合约内容
parms[18].Value = "";//AMS时间
parms[19].Value = "";//截关时间
parms[20].Value = "";//操作时间
parms[21].Value = 0;// 成本价
parms[22].Value = 0;// 一级售价
parms[23].Value = 0;//二级售价
parms[24].Value = 0;//三级售价
parms[25].Value = 0;//
parms[26].Value = 0;//
parms[27].Value = 0;//
parms[28].Value = 0;//
parms[29].Value = 0;//
parms[30].Value = 0;//
parms[31].Value = 0;//
parms[32].Value = 0;//
parms[33].Value = 0;//
parms[34].Value = 0;//
parms[35].Value = 0;//
parms[36].Value = 0;//
parms[37].Value = 0;// OF售价
parms[38].Value = 0;// BAF售价
parms[39].Value = 0;// CAF售价
parms[40].Value = 0;// PSS售价
parms[41].Value = 0;// OF售价
parms[42].Value = 0;// BAF售价
parms[43].Value = 0;// CAF售价
parms[44].Value = 0;// PSS售价
parms[45].Value = 0;// GRI售价
parms[46].Value = 0;// INLAND售价
parms[47].Value = 0;// ISPS售价
parms[48].Value = 0;// SZ售价
parms[49].Value = 0;// AG售价
parms[50].Value = 0;// OF售价
parms[51].Value = 0;// BAF售价
parms[52].Value = 0;// CAF售价
parms[53].Value = 0;// PSS售价
parms[54].Value = 0;// GRI售价
parms[55].Value = 0;// INLAND售价
parms[56].Value = 0;// ISPS售价
parms[57].Value = 0;// SZ售价
parms[58].Value = 0;// AG售价
parms[59].Value = 0;// OF售价
parms[60].Value = 0;// BAF售价
parms[61].Value = 0;// CAF售价
parms[62].Value = 0;// PSS售价
parms[63].Value = 0;// GRI售价
parms[64].Value = 0;// INLAND售价
parms[65].Value = 0;// ISPS售价
parms[66].Value = 0;// SZ售价
parms[67].Value = 0;// AG售价
parms[68].Value = 0;//OF售价"
parms[69].Value = 0;//BAF售价"
parms[70].Value = 0;//CAF售价"
parms[71].Value = 0;//PSS售价"
parms[72].Value = 0;//GRI售价"
parms[73].Value = 0;//INLAND售价"
parms[74].Value = 0;//ISPS售价"
parms[75].Value = 0;//SZ售价"
parms[76].Value = 0;//AG售价"
parms[77].Value = myRow["REMARK"] == null ? "" : myRow["REMARK"].ToString().Trim();// 备注
parms[78].Value = strUserID;//
parms[79].Value = "";//CARRIERCN
parms[80].Value = "";//BOOKINGFEE;//
parms[81].Value = "";//CTNFEE;//
parms[82].Value = "";//THCFEE;//
parms[83].Value = "";//FILEFEE;//
parms[84].Value = myRow["LCLCOST"].ToString().Trim() == null ? "" : myRow["LCLCOST"].ToString().Trim();// CISF
parms[85].Value = myRow["LCLPRICE"].ToString().Trim() == null ? "" : myRow["LCLPRICE"].ToString().Trim();// CISF
parms[86].Value = myRow["CISF"].ToString().Trim() == null ? "" : myRow["CISF"].ToString().Trim();// CISF
parms[87].Value = myRow["REMARK2"] == null ? "" : myRow["REMARK2"].ToString().Trim();// 备注2
parms[88].Value = strCORPID.Trim();
parms[89].Value = 0;
parms[90].Value = 0;
parms[91].Value = 0;
parms[92].Value = 0;
parms[93].Value = 0;
parms[94].Value = 0;
parms[95].Value = 0;
parms[96].Value = 0;
parms[97].Value = 0;
parms[98].Value = 0;
parms[99].Value = 0;
parms[100].Value = 0;
parms[101].Value = 0;
parms[102].Value = 0;
parms[103].Value = 0;
parms[104].Value = 0;
parms[105].Value = myRow["PIRICEVIAPORT"] == null ? "" : myRow["PIRICEVIAPORT"].ToString().Trim();//中转港
//有效期
string strEFFECTIVEDATE = ""; ;
string strEFFECTIVEDATE_name = "";
if (!myRow["EFFECTIVEDATE"].ToString().Trim().Equals(""))
{
strEFFECTIVEDATE = "'" + myRow["EFFECTIVEDATE"].ToString().Trim() + "',";
strEFFECTIVEDATE_name = "EFFECTIVEDATE,";
}
//
//有效期
//string strVALIDDATE = ""; ;
//string strVALIDDATE_name = "";
//if (!myRow["VALIDDATE"].ToString().Trim().Equals(""))
//{
// strVALIDDATE = "'" + myRow["VALIDDATE"].ToString().Trim() + "',";
// strVALIDDATE_name = "VALIDDATE,";
//}
//
string SQL_INSERT_INFO = "insert into crm_price_carrier(GID,LOCKFLAG,PODLOAD,PORTDISCHARGE,DESTINATION,CARRIER,FORWARDER,ETD,TT,VIA,POC,SVC,LANE,CARRIERLANE,OWS,{0}INPUTBY,COMMODITY,SC,NAMEAC,SICUT,CUSCLSG,CYCLSG,[20GP0],[20GP1],[20GP2],[20GP3],[40GP0],[40GP1],[40GP2],[40GP3],[40HQ0],[40HQ1],[40HQ2],[40HQ3],[45HQ0],[45HQ1],[45HQ2],[45HQ3],ISISSUE,PROFIT20GP1,PROFIT40GP1,PROFIT40HQ1,PROFIT45HQ1,OF20GP,BAF20GP,CAF20GP,PSS20GP,GRI20GP,INLAND20GP,ISPS20GP,SZ20GP,AG20GP,OF40GP,BAF40GP,CAF40GP,PSS40GP,GRI40GP,INLAND40GP,ISPS40GP,SZ40GP,AG40GP,OF40HQ,BAF40HQ,CAF40HQ,PSS40HQ,GRI40HQ,INLAND40HQ,ISPS40HQ,SZ40HQ,AG40HQ,OF45HQ,BAF45HQ,CAF45HQ,PSS45HQ,GRI45HQ,INLAND45HQ,ISPS45HQ,SZ45HQ,AG45HQ,REMARK,MODIFIEDUSER,CARRIERCN,BOOKINGFEE,CTNFEE,THCFEE,FILEFEE,LCLCOST,LCLPRICE,CISF,REMARK2,TYPE,CORPID,[40RH0],[40RH1],[40RH2],[40RH3],PROFIT40RH1,PROFIT40RH2,PROFIT40RH3,OF40RH,BAF40RH,CAF40RH,PSS40RH,GRI40RH,INLAND40RH,ISPS40RH,SZ40RH,AG40RH,PIRICEVIAPORT,[20RS0],[20RS1],[20RS2],[20RS3],[PROFIT20RS1],[PROFIT20RS2],[PROFIT20RS3],[OF20RS],[BAF20RS],[CAF20RS],[PSS20RS],[GRI20RS],[INLAND20RS],[ISPS20RS],[SZ20RS],[AG20RS],[40NOR0],[40NOR1],[40NOR2],[40NOR3],[PROFIT40NOR1],[PROFIT40NOR2],[PROFIT40NOR3],[OF40NOR],[BAF40NOR],[CAF40NOR],[PSS40NOR],[GRI40NOR],[INLAND40NOR],[ISPS40NOR],[SZ40NOR],[AG40NOR]) "
+ " values(@GID,0,@PODLOAD,@PORTDISCHARGE,@DESTINATION,@CARRIER,@FORWARDER,@ETD,@TT,@VIA,@POC,@SVC,@LANE,@CARRIERLANE,@OWS,{1}@INPUTBY,@COMMODITY,@SC,@NAMEAC,@SICUT,@CUSCLSG,@CYCLSG,@D_20GP0,@D_20GP1,@D_20GP2,@D_20GP3,@D_40GP0,@D_40GP1,@D_40GP2,@D_40GP3,@D_40HQ0,@D_40HQ1,@D_40HQ2,@D_40HQ3,@D_45HQ0,@D_45HQ1,@D_45HQ2,@D_45HQ3,0,@PROFIT20GP1,@PROFIT40GP1,@PROFIT40HQ1,@PROFIT45HQ1,@OF20GP,@BAF20GP,@CAF20GP,@PSS20GP,@GRI20GP,@INLAND20GP,@ISPS20GP,@SZ20GP,@AG20GP,@OF40GP,@BAF40GP,@CAF40GP,@PSS40GP,@GRI40GP,@INLAND40GP,@ISPS40GP,@SZ40GP,@AG40GP,@OF40HQ,@BAF40HQ,@CAF40HQ,@PSS40HQ,@GRI40HQ,@INLAND40HQ,@ISPS40HQ,@SZ40HQ,@AG40HQ,@OF45HQ,@BAF45HQ,@CAF45HQ,@PSS45HQ,@GRI45HQ,@INLAND45HQ,@ISPS45HQ,@SZ45HQ,@AG45HQ,@REMARK,@MODIFIEDUSER,@CARRIERCN,@BOOKINGFEE,@CTNFEE,@THCFEE,@FILEFEE,@LCLCOST,@LCLPRICE,@CISF,@REMARK2,'LCL',@CORPID,@D_40RH0,@D_40RH1,@D_40RH2,@D_40RH3,@PROFIT40RH1,@PROFIT40RH2,@PROFIT40RH3,@OF40RH,@BAF40RH,@CAF40RH,@PSS40RH,@GRI40RH,@INLAND40RH,@ISPS40RH,@SZ40RH,@AG40RH,@PIRICEVIAPORT,@D_20RS0,@D_20RS1,@D_20RS2,@D_20RS3,@PROFIT20RS1,@PROFIT20RS2,@PROFIT20RS3,@OF20RS,@BAF20RS,@CAF20RS,@PSS20RS,@GRI20RS,@INLAND20RS,@ISPS20RS,@SZ20RS,@AG20RS,@D_40NOR0,@D_40NOR1,@D_40NOR2,@D_40NOR3,@PROFIT40NOR1,@PROFIT40NOR2,@PROFIT40NOR3,@OF40NOR,@BAF40NOR,@CAF40NOR,@PSS40NOR,@GRI40NOR,@INLAND40NOR,@ISPS40NOR,@SZ40NOR,@AG40NOR)";
//
SQL_INSERT_INFO = String.Format(SQL_INSERT_INFO, strEFFECTIVEDATE_name, strEFFECTIVEDATE);//, strVALIDDATE_name, strVALIDDATE
#endregion
//iResult = SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, SQL_INSERT_INFO, parms);
SqlConnection conn = new SqlConnection(SqlHelper.ConnectionStringLocalTransaction);
iResult = SqlHelper.ExecuteNonQuery(conn, CommandType.Text, SQL_INSERT_INFO, parms);
conn.Close();
if (iResult > 0)
{
iResult = 1;
}
else
{
iResult = -7;//插入失败
}
}
}
else
{
iResult = -1;
}
iResult = 1;//状态为1表示插入成功
}
catch (Exception execError)
{
iResult = -1;//有异常,插入失败
iResult = -2;//插入异常,事务已回滚成功
throw execError;
}
}
else
{
iResult = -9;//无符合条件的数据
}
}
}
}
else
{
iResult = -1;
}
return iResult;
}
/// <summary>
/// 海运整箱运价
/// </summary>
/// <param name="dsexcel"></param>
/// <param name="strUserID"></param>
/// <returns></returns>
public int InsertInfoExcel(DataSet dsexcel, string strUserID,string strCORPID)
{
T_ALL_DA T_ALL_DA = new T_ALL_DA();
int iResult = 0;
//string strPORTLOAD = T_ALL_DA.GetStrSQL("PORTLOAD", "select PORTLOAD from subcomp_seae_def where CORPID=(select GID from company where GID=(select COMPANYID from user_company where USERID='" + strUserID + "') and ISDELETED=0 and ISDISABLE=0)");//起运港
//
if (dsexcel.Tables[0].Rows.Count > 0)
{
foreach (DataTable myTable in dsexcel.Tables)
{
foreach (DataRow myRow in myTable.Rows)//遍历表
{
if (myRow["FLAG"].ToString().Trim().Equals("Y"))
{
try
{
string strPORTDISCHARGE = myRow["PORTDISCHARGE"] == null ? "" : myRow["PORTDISCHARGE"].ToString().Trim();//卸货港
string strCARRIER = myRow["CARRIER"] == null ? "" : myRow["CARRIER"].ToString().Trim();//船公司
string strETD = myRow["ETD"] == null ? "" : myRow["ETD"].ToString().Trim();//开航日
string strTT = myRow["TT"] == null ? "" : myRow["TT"].ToString().Trim();//航程
string strVIA = myRow["VIA"] == null ? "" : myRow["VIA"].ToString().Trim();//中转港
string strCARRIERLANE = myRow["CARRIERLANE"] == null ? "" : myRow["CARRIERLANE"].ToString().Trim();//船公司航线代码
string strSVC = myRow["SVC"] == null ? "" : myRow["SVC"].ToString().Trim();//服务
string strCOMMODITY = myRow["COMMODITY"] == null ? "" : myRow["COMMODITY"].ToString().Trim();//品名
string strDESTINATION = myRow["DESTINATION"] == null ? "" : myRow["DESTINATION"].ToString().Trim();//目的港
string strPIRICEVIAPORT = myRow["PIRICEVIAPORT"] == null ? "" : myRow["PIRICEVIAPORT"].ToString().Trim();//中转港
string strSQL = "select GID,LOCKFLAG,PODLOAD,PORTDISCHARGE,DESTINATION,CARRIER,FORWARDER,ETD,TT,VIA,POC,SVC,LANE,CARRIERLANE,OWS,VALIDDATE,EFFECTIVEDATE,INPUTBY,INPUTTIME,MODIFYTIME,COMMODITY,SC,NAMEAC,SICUT,CUSCLSG,CYCLSG,[20GP0],[20GP1],[20GP2],[20GP3],[40GP0],[40GP1],[40GP2],[40GP3],[40HQ0],[40HQ1],[40HQ2],[40HQ3],[45HQ0],[45HQ1],[45HQ2],[45HQ3],MODIFIEDUSER,ISISSUE,PROFIT20GP1,PROFIT40GP1,PROFIT40HQ1,PROFIT45HQ1,PROFIT20GP2,PROFIT40GP2,PROFIT40HQ2,PROFIT45HQ2,PROFIT20GP3,PROFIT40GP3,PROFIT40HQ3,PROFIT45HQ3,OF20GP,BAF20GP,CAF20GP,PSS20GP,GRI20GP,INLAND20GP,ISPS20GP,SZ20GP,AG20GP,OF40GP,BAF40GP,CAF40GP,PSS40GP,GRI40GP,INLAND40GP,ISPS40GP,SZ40GP,AG40GP,OF40HQ,BAF40HQ,CAF40HQ,PSS40HQ,GRI40HQ,INLAND40HQ,ISPS40HQ,SZ40HQ,AG40HQ,OF45HQ,BAF45HQ,CAF45HQ,PSS45HQ,GRI45HQ,INLAND45HQ,ISPS45HQ,SZ45HQ,AG45HQ,REMARK,CORPID,[40RH0],[40RH1],[40RH2],[40RH3],PROFIT40RH1,PROFIT40RH2,PROFIT40RH3,OF40RH,BAF40RH,CAF40RH,PSS40RH,GRI40RH,INLAND40RH,ISPS40RH,SZ40RH,AG40RH,PIRICEVIAPORT,[20RS0],[20RS1],[20RS2],[20RS3],[PROFIT20RS1],[PROFIT20RS2],[PROFIT20RS3],[OF20RS],[BAF20RS],[CAF20RS],[PSS20RS],[GRI20RS],[INLAND20RS],[ISPS20RS],[SZ20RS],[AG20RS],[40NOR0],[40NOR1],[40NOR2],[40NOR3],[PROFIT40NOR1],[PROFIT40NOR2],[PROFIT40NOR3],[OF40NOR],[BAF40NOR],[CAF40NOR],[PSS40NOR],[GRI40NOR],[INLAND40NOR],[ISPS40NOR],[SZ40NOR],[AG40NOR] from crm_price_carrier where PORTDISCHARGE='" + strPORTDISCHARGE + "' and CARRIER='" + strCARRIER + "' and ETD='" + strETD + "' and TT='" + strTT + "' and VIA='" + strVIA + "' and CARRIERLANE='" + strCARRIERLANE + "' and SVC='" + strSVC + "' and COMMODITY='" + strCOMMODITY + "' and DESTINATION='" + strDESTINATION + "' and TYPE='FCL' and CORPID='" + strCORPID.Trim() + "'";
DataSet ds = SqlHelper.OpenSqlDataSet(SqlHelper.ConnectionStringLocalTransaction, strSQL);
if (ds != null)
{
if (ds.Tables[0].Rows.Count > 0)
{
#region 生成更新语句参数
SqlParameter[] parms = new SqlParameter[]
{
new SqlParameter("@PORTDISCHARGE",SqlDbType.VarChar,60),//卸货港
new SqlParameter("@CARRIER",SqlDbType.VarChar,20),//船公司
new SqlParameter("@ETD",SqlDbType.VarChar,50),//开航日
new SqlParameter("@TT",SqlDbType.VarChar,50),//航程
new SqlParameter("@VIA",SqlDbType.VarChar,60),//中转港
new SqlParameter("@POC",SqlDbType.VarChar,100),//挂靠港
new SqlParameter("@SVC",SqlDbType.VarChar,50),//服务
new SqlParameter("@LANE",SqlDbType.VarChar,50),//航线
new SqlParameter("@CARRIERLANE",SqlDbType.VarChar,50),//船公司航线代码
new SqlParameter("@OWS",SqlDbType.VarChar,200),//超重费
new SqlParameter("@COMMODITY",SqlDbType.VarChar,1024),//品名
new SqlParameter("@D_20GP0",SqlDbType.Decimal),//成本价
new SqlParameter("@D_20GP1",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_20GP2",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_20GP3",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_40GP0",SqlDbType.Decimal),//
new SqlParameter("@D_40GP1",SqlDbType.Decimal),//
new SqlParameter("@D_40GP2",SqlDbType.Decimal),//
new SqlParameter("@D_40GP3",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ3",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ3",SqlDbType.Decimal),//
new SqlParameter("@PROFIT20GP1",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP1",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ1",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT45HQ1",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT20GP2",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP2",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ2",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT45HQ2",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT20GP3",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP3",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ3",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT45HQ3",SqlDbType.Decimal),// CAF售价
new SqlParameter("@OF20GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF20GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF20GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS20GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI20GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND20GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS20GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ20GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG20GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF45HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF45HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF45HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS45HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI45HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND45HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS45HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ45HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG45HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@REMARK",SqlDbType.VarChar,1024),// 备注
new SqlParameter("@DESTINATION",SqlDbType.VarChar,60),// 目的港
new SqlParameter("@MODIFIEDUSER",SqlDbType.VarChar,36),//
//new SqlParameter("@CORPID",SqlDbType.VarChar,36),
new SqlParameter("@D_40RH0", SqlDbType.Decimal,9),
new SqlParameter("@D_40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@OF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@BAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@CAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PSS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@GRI40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@INLAND40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@ISPS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@SZ40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@AG40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PIRICEVIAPORT",SqlDbType.VarChar,60),
new SqlParameter("@PODLOAD",SqlDbType.VarChar,60),
new SqlParameter("@D_20RS0", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS1", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS2", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS3", SqlDbType.Decimal,9),
new SqlParameter("@OF20RS", SqlDbType.Decimal,9),
new SqlParameter("@BAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@CAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@PSS20RS", SqlDbType.Decimal,9),
new SqlParameter("@GRI20RS", SqlDbType.Decimal,9),
new SqlParameter("@INLAND20RS", SqlDbType.Decimal,9),
new SqlParameter("@ISPS20RS", SqlDbType.Decimal,9),
new SqlParameter("@SZ20RS", SqlDbType.Decimal,9),
new SqlParameter("@AG20RS", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR0", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@OF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@BAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@CAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@PSS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@GRI40NOR", SqlDbType.Decimal,9),
new SqlParameter("@INLAND40NOR", SqlDbType.Decimal,9),
new SqlParameter("@ISPS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@SZ40NOR", SqlDbType.Decimal,9),
new SqlParameter("@AG40NOR", SqlDbType.Decimal,9)
};
#endregion
#region 获取参数
parms[0].Value = myRow["PORTDISCHARGE"] == null ? "" : myRow["PORTDISCHARGE"].ToString().Trim();//卸货港
parms[1].Value = myRow["CARRIER"] == null ? "" : myRow["CARRIER"].ToString().Trim();//船公司
parms[2].Value = myRow["ETD"] == null ? "" : myRow["ETD"].ToString().Trim();//开航日
parms[3].Value = myRow["TT"] == null ? "" : myRow["TT"].ToString().Trim();//航程
parms[4].Value = myRow["VIA"] == null ? "" : myRow["VIA"].ToString().Trim();//中转港
parms[5].Value = myRow["POC"] == null ? "" : myRow["POC"].ToString().Trim();//挂靠港
parms[6].Value = myRow["SVC"] == null ? "" : myRow["SVC"].ToString().Trim();//服务
parms[7].Value = myRow["LANE"] == null ? "" : myRow["LANE"].ToString().Trim();//航线
parms[8].Value = myRow["CARRIERLANE"] == null ? "" : myRow["CARRIERLANE"].ToString().Trim();//船公司航线代码
parms[9].Value = myRow["OWS"] == null ? "" : myRow["OWS"].ToString().Trim();//超重费
parms[10].Value = myRow["COMMODITY"] == null ? "" : myRow["COMMODITY"].ToString().Trim();//品名
parms[11].Value = myRow["20GP0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20GP0"].ToString().Trim());// 成本价
parms[12].Value = myRow["20GP1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20GP1"].ToString().Trim());// 一级售价
//parms[13].Value = myRow["20GP2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20GP2"].ToString().Trim());// 二级售价
//parms[14].Value = myRow["20GP3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20GP3"].ToString().Trim());// 三级售价
parms[13].Value = 0;// 二级售价
parms[14].Value = 0;// 三级售价
parms[15].Value = myRow["40GP0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40GP0"].ToString().Trim());//
parms[16].Value = myRow["40GP1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40GP1"].ToString().Trim());//
//parms[17].Value = myRow["40GP2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40GP2"].ToString().Trim());//
//parms[18].Value = myRow["40GP3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40GP3"].ToString().Trim());//
parms[17].Value = 0;// 二级售价
parms[18].Value = 0;// 三级售价
parms[19].Value = myRow["40HQ0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40HQ0"].ToString().Trim());//
parms[20].Value = myRow["40HQ1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40HQ1"].ToString().Trim());//
//parms[21].Value = myRow["40HQ2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40HQ2"].ToString().Trim());//
//parms[22].Value = myRow["40HQ3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40HQ3"].ToString().Trim());//
parms[21].Value = 0;// 二级售价
parms[22].Value = 0;// 三级售价
parms[23].Value = myRow["45HQ0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["45HQ0"].ToString().Trim());//
parms[24].Value = myRow["45HQ1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["45HQ1"].ToString().Trim());//
//parms[25].Value = myRow["45HQ2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["45HQ2"].ToString().Trim());//
//parms[26].Value = myRow["45HQ3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["45HQ3"].ToString().Trim());//
parms[25].Value = 0;// 二级售价
parms[26].Value = 0;// 三级售价
parms[27].Value = myRow["PROFIT20GP1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20GP1"].ToString().Trim());//
parms[28].Value = myRow["PROFIT40GP1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40GP1"].ToString().Trim());//
parms[29].Value = myRow["PROFIT40HQ1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40HQ1"].ToString().Trim());//
parms[30].Value = myRow["PROFIT45HQ1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT45HQ1"].ToString().Trim());//
//parms[31].Value = myRow["PROFIT20GP2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20GP2"].ToString().Trim());//
//parms[32].Value = myRow["PROFIT40GP2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40GP2"].ToString().Trim());//
//parms[33].Value = myRow["PROFIT40HQ2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40HQ2"].ToString().Trim());//
//parms[34].Value = myRow["PROFIT45HQ2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT45HQ2"].ToString().Trim());//
//parms[35].Value = myRow["PROFIT20GP3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20GP3"].ToString().Trim());//
//parms[36].Value = myRow["PROFIT40GP3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40GP3"].ToString().Trim());//
//parms[37].Value = myRow["PROFIT40HQ3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40HQ3"].ToString().Trim());//
//parms[38].Value = myRow["PROFIT45HQ3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT45HQ3"].ToString().Trim());//
parms[31].Value = 0;// 二级售价
parms[32].Value = 0;// 二级售价
parms[33].Value = 0;// 二级售价
parms[34].Value = 0;// 二级售价
parms[35].Value = 0;// 三级售价
parms[36].Value = 0;// 三级售价
parms[37].Value = 0;// 三级售价
parms[38].Value = 0;// 三级售价
parms[39].Value = myRow["OF20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF20GP"].ToString().Trim());// OF售价
parms[40].Value = myRow["BAF20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF20GP"].ToString().Trim());// BAF售价
parms[41].Value = myRow["CAF20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF20GP"].ToString().Trim());// CAF售价
parms[42].Value = myRow["PSS20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS20GP"].ToString().Trim());// PSS售价
parms[43].Value = myRow["GRI20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI20GP"].ToString().Trim());// GRI售价
parms[44].Value = myRow["INLAND20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND20GP"].ToString().Trim());// INLAND售价
parms[45].Value = myRow["ISPS20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS20GP"].ToString().Trim());// ISPS售价
parms[46].Value = myRow["SZ20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ20GP"].ToString().Trim());// SZ售价
parms[47].Value = myRow["AG20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG20GP"].ToString().Trim());// AG售价
parms[48].Value = myRow["OF40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF40GP"].ToString().Trim());// OF售价
parms[49].Value = myRow["BAF40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF40GP"].ToString().Trim());// BAF售价
parms[50].Value = myRow["CAF40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF40GP"].ToString().Trim());// CAF售价
parms[51].Value = myRow["PSS40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS40GP"].ToString().Trim());// PSS售价
parms[52].Value = myRow["GRI40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI40GP"].ToString().Trim());// GRI售价
parms[53].Value = myRow["INLAND40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND40GP"].ToString().Trim());// INLAND售价
parms[54].Value = myRow["ISPS40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS40GP"].ToString().Trim());// ISPS售价
parms[55].Value = myRow["SZ40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ40GP"].ToString().Trim());// SZ售价
parms[56].Value = myRow["AG40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG40GP"].ToString().Trim());// AG售价
parms[57].Value = myRow["OF40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF40HQ"].ToString().Trim());// OF售价
parms[58].Value = myRow["BAF40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF40HQ"].ToString().Trim());// BAF售价
parms[59].Value = myRow["CAF40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF40HQ"].ToString().Trim());// CAF售价
parms[60].Value = myRow["PSS40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS40HQ"].ToString().Trim());// PSS售价
parms[61].Value = myRow["GRI40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI40HQ"].ToString().Trim());// GRI售价
parms[62].Value = myRow["INLAND40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND40HQ"].ToString().Trim());// INLAND售价
parms[63].Value = myRow["ISPS40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS40HQ"].ToString().Trim());// ISPS售价
parms[64].Value = myRow["SZ40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ40HQ"].ToString().Trim());// SZ售价
parms[65].Value = myRow["AG40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG40HQ"].ToString().Trim());// AG售价
parms[66].Value = myRow["OF45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF45HQ"].ToString().Trim());// OF售价
parms[67].Value = myRow["BAF45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF45HQ"].ToString().Trim());// BAF售价
parms[68].Value = myRow["CAF45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF45HQ"].ToString().Trim());// CAF售价
parms[69].Value = myRow["PSS45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS45HQ"].ToString().Trim());// PSS售价
parms[70].Value = myRow["GRI45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI45HQ"].ToString().Trim());// GRI售价
parms[71].Value = myRow["INLAND45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND45HQ"].ToString().Trim());// INLAND售价
parms[72].Value = myRow["ISPS45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS45HQ"].ToString().Trim());// ISPS售价
parms[73].Value = myRow["SZ45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ45HQ"].ToString().Trim());// SZ售价
parms[74].Value = myRow["AG45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG45HQ"].ToString().Trim());// AG售价
parms[75].Value = myRow["REMARK"] == null ? "" : myRow["REMARK"].ToString().Trim();// 备注
parms[76].Value = myRow["DESTINATION"] == null ? "" : myRow["DESTINATION"].ToString().Trim();// 目的港
parms[77].Value = strUserID;//
parms[78].Value = myRow["40RH0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40RH0"].ToString().Trim());
parms[79].Value = myRow["40RH1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40RH1"].ToString().Trim());
//parms[80].Value = myRow["40RH2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40RH2"].ToString().Trim());
//parms[81].Value = myRow["40RH3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40RH3"].ToString().Trim());
parms[80].Value = 0;// 二级售价
parms[81].Value = 0;// 三级售价
parms[82].Value = myRow["PROFIT40RH1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40RH1"].ToString().Trim());
//parms[83].Value = myRow["PROFIT40RH2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40RH2"].ToString().Trim());
//parms[84].Value = myRow["PROFIT40RH3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40RH3"].ToString().Trim());
parms[83].Value = 0;// 二级售价
parms[84].Value = 0;// 三级售价
parms[85].Value = myRow["OF40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF40RH"].ToString().Trim());
parms[86].Value = myRow["BAF40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF40RH"].ToString().Trim());
parms[87].Value = myRow["CAF40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF40RH"].ToString().Trim());
parms[88].Value = myRow["PSS40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS40RH"].ToString().Trim());
parms[89].Value = myRow["GRI40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI40RH"].ToString().Trim());
parms[90].Value = myRow["INLAND40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND40RH"].ToString().Trim());
parms[91].Value = myRow["ISPS40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS40RH"].ToString().Trim());
parms[92].Value = myRow["SZ40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ40RH"].ToString().Trim());
parms[93].Value = myRow["AG40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG40RH"].ToString().Trim());
parms[94].Value = myRow["PIRICEVIAPORT"] == null ? "" : myRow["PIRICEVIAPORT"].ToString().Trim();
parms[95].Value = myRow["PODLOAD"] == null ? "" : myRow["PODLOAD"].ToString().Trim();
parms[96].Value = myRow["20RS0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20RS0"].ToString().Trim());
parms[97].Value = myRow["20RS1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20RS1"].ToString().Trim());
//parms[98].Value = myRow["20RS2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20RS2"].ToString().Trim());
//parms[99].Value = myRow["20RS3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20RS3"].ToString().Trim());
parms[98].Value = 0;
parms[99].Value = 0;
parms[100].Value = myRow["PROFIT20RS1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20RS1"].ToString().Trim());
//parms[101].Value = myRow["PROFIT20RS2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20RS2"].ToString().Trim());
//parms[102].Value = myRow["PROFIT20RS3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20RS3"].ToString().Trim());
parms[101].Value = 0;
parms[102].Value = 0;
parms[103].Value = myRow["OF20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF20RS"].ToString().Trim());
parms[104].Value = myRow["BAF20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF20RS"].ToString().Trim());
parms[105].Value = myRow["CAF20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF20RS"].ToString().Trim());
parms[106].Value = myRow["PSS20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS20RS"].ToString().Trim());
parms[107].Value = myRow["GRI20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI20RS"].ToString().Trim());
parms[108].Value = myRow["INLAND20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND20RS"].ToString().Trim());
parms[109].Value = myRow["ISPS20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS20RS"].ToString().Trim());
parms[110].Value = myRow["SZ20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ20RS"].ToString().Trim());
parms[111].Value = myRow["AG20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG20RS"].ToString().Trim());
parms[112].Value = myRow["40NOR0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40NOR0"].ToString().Trim());
parms[113].Value = myRow["40NOR1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40NOR1"].ToString().Trim());
//parms[114].Value = myRow["40NOR2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40NOR2"].ToString().Trim());
//parms[115].Value = myRow["40NOR3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40NOR3"].ToString().Trim());
parms[114].Value = 0;
parms[115].Value = 0;
parms[116].Value = myRow["PROFIT40NOR1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40NOR1"].ToString().Trim());
//parms[117].Value = myRow["PROFIT40NOR2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40NOR2"].ToString().Trim());
//parms[118].Value = myRow["PROFIT40NOR3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40NOR3"].ToString().Trim());
parms[117].Value = 0;
parms[118].Value = 0;
parms[119].Value = myRow["OF40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF40NOR"].ToString().Trim());
parms[120].Value = myRow["BAF40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF40NOR"].ToString().Trim());
parms[121].Value = myRow["CAF40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF40NOR"].ToString().Trim());
parms[122].Value = myRow["PSS40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS40NOR"].ToString().Trim());
parms[123].Value = myRow["GRI40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI40NOR"].ToString().Trim());
parms[124].Value = myRow["INLAND40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND40NOR"].ToString().Trim());
parms[125].Value = myRow["ISPS40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS40NOR"].ToString().Trim());
parms[126].Value = myRow["SZ40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ40NOR"].ToString().Trim());
parms[127].Value = myRow["AG40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG40NOR"].ToString().Trim());
//生效期
string strEFFECTIVEDATE = "EFFECTIVEDATE=null,";
if (!myRow["EFFECTIVEDATE"].ToString().Trim().Equals(""))
{
strEFFECTIVEDATE = "EFFECTIVEDATE='" + myRow["EFFECTIVEDATE"].ToString().Trim() + "',";
}
//有效期
string strVALIDDATE = "VALIDDATE=null,";
if (!myRow["VALIDDATE"].ToString().Trim().Equals(""))
{
strVALIDDATE = "VALIDDATE='" + myRow["VALIDDATE"].ToString().Trim() + "',";
}
string SQL_UPDATE_INFO="update crm_price_carrier set VIA=@VIA,POC=@POC,SVC=@SVC,LANE=@LANE,CARRIERLANE=@CARRIERLANE,OWS=@OWS,{0}{1}COMMODITY=@COMMODITY,[20GP0]=@D_20GP0,[20GP1]=@D_20GP1,[20GP2]=@D_20GP2,[20GP3]=@D_20GP3,[40GP0]=@D_40GP0,[40GP1]=@D_40GP1,[40GP2]=@D_40GP2,[40GP3]=@D_40GP3,[40HQ0]=@D_40HQ0,[40HQ1]=@D_40HQ1,[40HQ2]=@D_40HQ2,[40HQ3]=@D_40HQ3,[45HQ0]=@D_45HQ0,[45HQ1]=@D_45HQ1,[45HQ2]=@D_45HQ2,[45HQ3]=@D_45HQ3,MODIFYTIME=getdate(),PROFIT20GP1=@PROFIT20GP1,PROFIT40GP1=@PROFIT40GP1,PROFIT40HQ1=@PROFIT40HQ1,PROFIT45HQ1=@PROFIT45HQ1,PROFIT20GP2=@PROFIT20GP2,PROFIT40GP2=@PROFIT40GP2,PROFIT40HQ2=@PROFIT40HQ2,PROFIT45HQ2=@PROFIT45HQ2,PROFIT20GP3=@PROFIT20GP3,PROFIT40GP3=@PROFIT40GP3,PROFIT40HQ3=@PROFIT40HQ3,PROFIT45HQ3=@PROFIT45HQ3,OF20GP=@OF20GP,BAF20GP=@BAF20GP,CAF20GP=@CAF20GP,PSS20GP=@PSS20GP,GRI20GP=@GRI20GP,INLAND20GP=@INLAND20GP,ISPS20GP=@ISPS20GP,SZ20GP=@SZ20GP,AG20GP=@AG20GP,OF40GP=@OF40GP,BAF40GP=@BAF40GP,CAF40GP=@CAF40GP,PSS40GP=@PSS40GP,GRI40GP=@GRI40GP,INLAND40GP=@INLAND40GP,ISPS40GP=@ISPS40GP,SZ40GP=@SZ40GP,AG40GP=@AG40GP,OF40HQ=@OF40HQ,BAF40HQ=@BAF40HQ,CAF40HQ=@CAF40HQ,PSS40HQ=@PSS40HQ,GRI40HQ=@GRI40HQ,INLAND40HQ=@INLAND40HQ,ISPS40HQ=@ISPS40HQ,SZ40HQ=@SZ40HQ,AG40HQ=@AG40HQ,OF45HQ=@OF45HQ,BAF45HQ=@BAF45HQ,CAF45HQ=@CAF45HQ,PSS45HQ=@PSS45HQ,GRI45HQ=@GRI45HQ,INLAND45HQ=@INLAND45HQ,ISPS45HQ=@ISPS45HQ,SZ45HQ=@SZ45HQ,AG45HQ=@AG45HQ,REMARK=@REMARK, MODIFIEDUSER=@MODIFIEDUSER,DESTINATION=@DESTINATION,LOCKFLAG=0,ISISSUE=0,[40RH0]=@D_40RH0,[40RH1]=@D_40RH1,[40RH2]=@D_40RH2,[40RH3]=@D_40RH3,PROFIT40RH1=@PROFIT40RH1,PROFIT40RH2=@PROFIT40RH2,PROFIT40RH3=@PROFIT40RH3,OF40RH=@OF40RH,BAF40RH=@BAF40RH,CAF40RH=@CAF40RH,PSS40RH=@PSS40RH,GRI40RH=@GRI40RH,INLAND40RH=@INLAND40RH,ISPS40RH=@ISPS40RH,SZ40RH=@SZ40RH,AG40RH=@AG40RH,PIRICEVIAPORT=@PIRICEVIAPORT,PODLOAD=@PODLOAD,[20RS0]=@D_20RS0,[20RS1]=@D_20RS1,[20RS2]=@D_20RS2,[20RS3]=@D_20RS3,PROFIT20RS1=@PROFIT20RS1,PROFIT20RS2=@PROFIT20RS2,PROFIT20RS3=@PROFIT20RS3,OF20RS=@OF20RS,BAF20RS=@BAF20RS,CAF20RS=@CAF20RS,PSS20RS=@PSS20RS,GRI20RS=@GRI20RS,INLAND20RS=@INLAND20RS,ISPS20RS=@ISPS20RS,SZ20RS=@SZ20RS,AG20RS=@AG20RS,[40NOR0]=@D_40NOR0,[40NOR1]=@D_40NOR1,[40NOR2]=@D_40NOR2,[40NOR3]=@D_40NOR3,PROFIT40NOR1=@PROFIT40NOR1,PROFIT40NOR2=@PROFIT40NOR2,PROFIT40NOR3=@PROFIT40NOR3,OF40NOR=@OF40NOR,BAF40NOR=@BAF40NOR,CAF40NOR=@CAF40NOR,PSS40NOR=@PSS40NOR,GRI40NOR=@GRI40NOR,INLAND40NOR=@INLAND40NOR,ISPS40NOR=@ISPS40NOR,SZ40NOR=@SZ40NOR,AG40NOR=@AG40NOR where PORTDISCHARGE=@PORTDISCHARGE and CARRIER=@CARRIER and ETD=@ETD and TT=@TT and VIA=@VIA and CARRIERLANE=@CARRIERLANE and SVC=@SVC and COMMODITY=@COMMODITY and DESTINATION=@DESTINATION and TYPE='FCL' and CORPID='" + strCORPID.Trim() + "'";
SQL_UPDATE_INFO = String.Format(SQL_UPDATE_INFO, strEFFECTIVEDATE, strVALIDDATE);
#endregion
//iResult = SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, SQL_UPDATE_INFO, parms);
SqlConnection conn = new SqlConnection(SqlHelper.ConnectionStringLocalTransaction);
iResult = SqlHelper.ExecuteNonQuery(conn, CommandType.Text, SQL_UPDATE_INFO, parms);
conn.Close();
if (iResult > 0)
{
iResult = 1;
}
else
{
iResult = -6;//更新出错crm_price_carrier
}
}
else
{
#region 生成插入语句参数
SqlParameter[] parms = new SqlParameter[]
{
new SqlParameter("@GID",SqlDbType.VarChar,36),//惟一编号
new SqlParameter("@PODLOAD",SqlDbType.VarChar,60),//起运港
new SqlParameter("@PORTDISCHARGE",SqlDbType.VarChar,60),//卸货港
new SqlParameter("@DESTINATION",SqlDbType.VarChar,60),//目的港
new SqlParameter("@CARRIER",SqlDbType.VarChar,50),//船公司
new SqlParameter("@FORWARDER",SqlDbType.VarChar,20),//订舱代理
new SqlParameter("@ETD",SqlDbType.VarChar,50),//开航日
new SqlParameter("@TT",SqlDbType.VarChar,50),//航程
new SqlParameter("@VIA",SqlDbType.VarChar,60),//中转港
new SqlParameter("@POC",SqlDbType.VarChar,100),//挂靠港
new SqlParameter("@SVC",SqlDbType.VarChar,50),//服务
new SqlParameter("@LANE",SqlDbType.VarChar,50),//航线
new SqlParameter("@CARRIERLANE",SqlDbType.VarChar,50),//船公司航线代码
new SqlParameter("@OWS",SqlDbType.VarChar,200),//超重费
new SqlParameter("@INPUTBY",SqlDbType.VarChar,36),//录入人
new SqlParameter("@COMMODITY",SqlDbType.VarChar,1024),//品名
new SqlParameter("@SC",SqlDbType.VarChar,50),//合约方
new SqlParameter("@NAMEAC",SqlDbType.VarChar,100),//合约内容
new SqlParameter("@SICUT",SqlDbType.VarChar,50),//AMS时间
new SqlParameter("@CUSCLSG",SqlDbType.VarChar,50),//截关时间
new SqlParameter("@CYCLSG",SqlDbType.VarChar,50),//操作时间
new SqlParameter("@D_20GP0",SqlDbType.Decimal),//成本价
new SqlParameter("@D_20GP1",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_20GP2",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_20GP3",SqlDbType.Decimal),//一级售价
new SqlParameter("@D_40GP0",SqlDbType.Decimal),//
new SqlParameter("@D_40GP1",SqlDbType.Decimal),//
new SqlParameter("@D_40GP2",SqlDbType.Decimal),//
new SqlParameter("@D_40GP3",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_40HQ3",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ0",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ1",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ2",SqlDbType.Decimal),//
new SqlParameter("@D_45HQ3",SqlDbType.Decimal),//
new SqlParameter("@PROFIT20GP1",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP1",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ1",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT45HQ1",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT20GP2",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP2",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ2",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT45HQ2",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT20GP3",SqlDbType.Decimal),// OF售价
new SqlParameter("@PROFIT40GP3",SqlDbType.Decimal),// BAF售价
new SqlParameter("@PROFIT40HQ3",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PROFIT45HQ3",SqlDbType.Decimal),// CAF售价
new SqlParameter("@OF20GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF20GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF20GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS20GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI20GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND20GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS20GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ20GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG20GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40GP",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40GP",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40GP",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40GP",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40GP",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40GP",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40GP",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40GP",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40GP",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF40HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF40HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF40HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS40HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI40HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND40HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS40HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ40HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG40HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@OF45HQ",SqlDbType.Decimal),// OF售价
new SqlParameter("@BAF45HQ",SqlDbType.Decimal),// BAF售价
new SqlParameter("@CAF45HQ",SqlDbType.Decimal),// CAF售价
new SqlParameter("@PSS45HQ",SqlDbType.Decimal),// PSS售价
new SqlParameter("@GRI45HQ",SqlDbType.Decimal),// GRI售价
new SqlParameter("@INLAND45HQ",SqlDbType.Decimal),// INLAND售价
new SqlParameter("@ISPS45HQ",SqlDbType.Decimal),// ISPS售价
new SqlParameter("@SZ45HQ",SqlDbType.Decimal),// SZ售价
new SqlParameter("@AG45HQ",SqlDbType.Decimal),// AG售价
new SqlParameter("@REMARK",SqlDbType.VarChar,1024),// 备注
new SqlParameter("@MODIFIEDUSER",SqlDbType.VarChar,36),// 最后一次更新操作人GID
new SqlParameter("@CORPID",SqlDbType.VarChar,36),//
new SqlParameter("@D_40RH0", SqlDbType.Decimal,9),
new SqlParameter("@D_40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@D_40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH1", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH2", SqlDbType.Decimal,9) ,
new SqlParameter("@PROFIT40RH3", SqlDbType.Decimal,9) ,
new SqlParameter("@OF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@BAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@CAF40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PSS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@GRI40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@INLAND40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@ISPS40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@SZ40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@AG40RH", SqlDbType.Decimal,9) ,
new SqlParameter("@PIRICEVIAPORT",SqlDbType.VarChar,60),
new SqlParameter("@D_20RS0", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS1", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS2", SqlDbType.Decimal,9),
new SqlParameter("@D_20RS3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT20RS3", SqlDbType.Decimal,9),
new SqlParameter("@OF20RS", SqlDbType.Decimal,9),
new SqlParameter("@BAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@CAF20RS", SqlDbType.Decimal,9),
new SqlParameter("@PSS20RS", SqlDbType.Decimal,9),
new SqlParameter("@GRI20RS", SqlDbType.Decimal,9),
new SqlParameter("@INLAND20RS", SqlDbType.Decimal,9),
new SqlParameter("@ISPS20RS", SqlDbType.Decimal,9),
new SqlParameter("@SZ20RS", SqlDbType.Decimal,9),
new SqlParameter("@AG20RS", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR0", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@D_40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR1", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR2", SqlDbType.Decimal,9),
new SqlParameter("@PROFIT40NOR3", SqlDbType.Decimal,9),
new SqlParameter("@OF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@BAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@CAF40NOR", SqlDbType.Decimal,9),
new SqlParameter("@PSS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@GRI40NOR", SqlDbType.Decimal,9),
new SqlParameter("@INLAND40NOR", SqlDbType.Decimal,9),
new SqlParameter("@ISPS40NOR", SqlDbType.Decimal,9),
new SqlParameter("@SZ40NOR", SqlDbType.Decimal,9),
new SqlParameter("@AG40NOR", SqlDbType.Decimal,9)
};
#endregion
#region 获取参数
parms[0].Value = getBSNO();//惟一编号
parms[1].Value = myRow["PODLOAD"] == null ? "" : myRow["PODLOAD"].ToString().Trim();//起运港
parms[2].Value = myRow["PORTDISCHARGE"] == null ? "" : myRow["PORTDISCHARGE"].ToString().Trim();//卸货港
parms[3].Value = myRow["DESTINATION"] == null ? "" : myRow["DESTINATION"].ToString().Trim();//目的港
parms[4].Value = myRow["CARRIER"] == null ? "" : myRow["CARRIER"].ToString().Trim();//船公司
parms[5].Value = "";//订舱代理
parms[6].Value = myRow["ETD"] == null ? "" : myRow["ETD"].ToString().Trim();//开航日
parms[7].Value = myRow["TT"] == null ? "" : myRow["TT"].ToString().Trim();//航程
parms[8].Value = myRow["VIA"] == null ? "" : myRow["VIA"].ToString().Trim();//中转港
parms[9].Value = myRow["POC"] == null ? "" : myRow["POC"].ToString().Trim();//挂靠港
parms[10].Value = myRow["SVC"] == null ? "" : myRow["SVC"].ToString().Trim();//服务
parms[11].Value = myRow["LANE"] == null ? "" : myRow["LANE"].ToString().Trim();//航线
parms[12].Value = myRow["CARRIERLANE"] == null ? "" : myRow["CARRIERLANE"].ToString().Trim();//船公司航线代码
parms[13].Value = myRow["OWS"] == null ? "" : myRow["OWS"].ToString().Trim();//超重费
parms[14].Value = strUserID;//录入人
parms[15].Value = myRow["COMMODITY"] == null ? "" : myRow["COMMODITY"].ToString().Trim();//品名
parms[16].Value = "";//合约方
parms[17].Value = "";//合约内容
parms[18].Value = "";//AMS时间
parms[19].Value = "";//截关时间
parms[20].Value = "";//操作时间
parms[21].Value = myRow["20GP0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20GP0"].ToString().Trim());// 成本价
parms[22].Value = myRow["20GP1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20GP1"].ToString().Trim());// 一级售价
//parms[23].Value = myRow["20GP2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20GP2"].ToString().Trim());// 一级售价
//parms[24].Value = myRow["20GP3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20GP3"].ToString().Trim());// 一级售价
parms[23].Value = 0;// 二级售价
parms[24].Value = 0;// 三级售价
parms[25].Value = myRow["40GP0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40GP0"].ToString().Trim());//
parms[26].Value = myRow["40GP1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40GP1"].ToString().Trim());//
//parms[27].Value = myRow["40GP2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40GP2"].ToString().Trim());//
//parms[28].Value = myRow["40GP3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40GP3"].ToString().Trim());//
parms[27].Value = 0;// 二级售价
parms[28].Value = 0;// 三级售价
parms[29].Value = myRow["40HQ0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40HQ0"].ToString().Trim());//
parms[30].Value = myRow["40HQ1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40HQ1"].ToString().Trim());//
//parms[31].Value = myRow["40HQ2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40HQ2"].ToString().Trim());//
//parms[32].Value = myRow["40HQ3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40HQ3"].ToString().Trim());//
parms[31].Value = 0;// 二级售价
parms[32].Value = 0;// 三级售价
parms[33].Value = myRow["45HQ0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["45HQ0"].ToString().Trim());//
parms[34].Value = myRow["45HQ1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["45HQ1"].ToString().Trim());//
//parms[35].Value = myRow["45HQ2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["45HQ2"].ToString().Trim());//
//parms[36].Value = myRow["45HQ3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["45HQ3"].ToString().Trim());//
parms[35].Value = 0;// 二级售价
parms[36].Value = 0;// 三级售价
parms[37].Value = myRow["PROFIT20GP1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20GP1"].ToString().Trim());//
parms[38].Value = myRow["PROFIT40GP1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40GP1"].ToString().Trim());//
parms[39].Value = myRow["PROFIT40HQ1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40HQ1"].ToString().Trim());//
parms[40].Value = myRow["PROFIT45HQ1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT45HQ1"].ToString().Trim());//
//parms[41].Value = myRow["PROFIT20GP2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20GP2"].ToString().Trim());//
//parms[42].Value = myRow["PROFIT40GP2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40GP2"].ToString().Trim());//
//parms[43].Value = myRow["PROFIT40HQ2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40HQ2"].ToString().Trim());//
//parms[44].Value = myRow["PROFIT45HQ2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT45HQ2"].ToString().Trim());//
//parms[45].Value = myRow["PROFIT20GP3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20GP3"].ToString().Trim());//
//parms[46].Value = myRow["PROFIT40GP3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40GP3"].ToString().Trim());//
//parms[47].Value = myRow["PROFIT40HQ3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40HQ3"].ToString().Trim());//
//parms[48].Value = myRow["PROFIT45HQ3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT45HQ3"].ToString().Trim());//
parms[41].Value = 0;//
parms[42].Value = 0;//
parms[43].Value = 0;//
parms[44].Value = 0;//
parms[45].Value = 0;//
parms[46].Value = 0;//
parms[47].Value = 0;//
parms[48].Value = 0;//
parms[49].Value = myRow["OF20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF20GP"].ToString().Trim());// OF售价
parms[50].Value = myRow["BAF20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF20GP"].ToString().Trim());// BAF售价
parms[51].Value = myRow["CAF20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF20GP"].ToString().Trim());// CAF售价
parms[52].Value = myRow["PSS20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS20GP"].ToString().Trim());// PSS售价
parms[53].Value = myRow["GRI20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI20GP"].ToString().Trim());// GRI售价
parms[54].Value = myRow["INLAND20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND20GP"].ToString().Trim());// INLAND售价
parms[55].Value = myRow["ISPS20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS20GP"].ToString().Trim());// ISPS售价
parms[56].Value = myRow["SZ20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ20GP"].ToString().Trim());// SZ售价
parms[57].Value = myRow["AG20GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG20GP"].ToString().Trim());// AG售价
parms[58].Value = myRow["OF40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF40GP"].ToString().Trim());// OF售价
parms[59].Value = myRow["BAF40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF40GP"].ToString().Trim());// BAF售价
parms[60].Value = myRow["CAF40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF40GP"].ToString().Trim());// CAF售价
parms[61].Value = myRow["PSS40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS40GP"].ToString().Trim());// PSS售价
parms[62].Value = myRow["GRI40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI40GP"].ToString().Trim());// GRI售价
parms[63].Value = myRow["INLAND40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND40GP"].ToString().Trim());// INLAND售价
parms[64].Value = myRow["ISPS40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS40GP"].ToString().Trim());// ISPS售价
parms[65].Value = myRow["SZ40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ40GP"].ToString().Trim());// SZ售价
parms[66].Value = myRow["AG40GP"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG40GP"].ToString().Trim());// AG售价
parms[67].Value = myRow["OF40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF40HQ"].ToString().Trim());// OF售价
parms[68].Value = myRow["BAF40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF40HQ"].ToString().Trim());// BAF售价
parms[69].Value = myRow["CAF40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF40HQ"].ToString().Trim());// CAF售价
parms[70].Value = myRow["PSS40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS40HQ"].ToString().Trim());// PSS售价
parms[71].Value = myRow["GRI40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI40HQ"].ToString().Trim());// GRI售价
parms[72].Value = myRow["INLAND40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND40HQ"].ToString().Trim());// INLAND售价
parms[73].Value = myRow["ISPS40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS40HQ"].ToString().Trim());// ISPS售价
parms[74].Value = myRow["SZ40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ40HQ"].ToString().Trim());// SZ售价
parms[75].Value = myRow["AG40HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG40HQ"].ToString().Trim());// AG售价
parms[76].Value = myRow["OF45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF45HQ"].ToString().Trim());// OF售价
parms[77].Value = myRow["BAF45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF45HQ"].ToString().Trim());// BAF售价
parms[78].Value = myRow["CAF45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF45HQ"].ToString().Trim());// CAF售价
parms[79].Value = myRow["PSS45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS45HQ"].ToString().Trim());// PSS售价
parms[80].Value = myRow["GRI45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI45HQ"].ToString().Trim());// GRI售价
parms[81].Value = myRow["INLAND45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND45HQ"].ToString().Trim());// INLAND售价
parms[82].Value = myRow["ISPS45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS45HQ"].ToString().Trim());// ISPS售价
parms[83].Value = myRow["SZ45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ45HQ"].ToString().Trim());// SZ售价
parms[84].Value = myRow["AG45HQ"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG45HQ"].ToString().Trim());// AG售价
parms[85].Value = myRow["REMARK"] == null ? "" : myRow["REMARK"].ToString().Trim();// 备注
parms[86].Value = strUserID;// 备注
parms[87].Value = strCORPID;
parms[88].Value = myRow["40RH0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40RH0"].ToString().Trim());
parms[89].Value = myRow["40RH1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40RH1"].ToString().Trim());
//parms[90].Value = myRow["40RH2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40RH2"].ToString().Trim());
//parms[91].Value = myRow["40RH3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40RH3"].ToString().Trim());
parms[90].Value = 0;
parms[91].Value = 0;
parms[92].Value = myRow["PROFIT40RH1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40RH1"].ToString().Trim());
//parms[93].Value = myRow["PROFIT40RH2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40RH2"].ToString().Trim());
//parms[94].Value = myRow["PROFIT40RH3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40RH3"].ToString().Trim());
parms[93].Value = 0;
parms[94].Value = 0;
parms[95].Value = myRow["OF40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF40RH"].ToString().Trim());
parms[96].Value = myRow["BAF40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF40RH"].ToString().Trim());
parms[97].Value = myRow["CAF40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF40RH"].ToString().Trim());
parms[98].Value = myRow["PSS40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS40RH"].ToString().Trim());
parms[99].Value = myRow["GRI40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI40RH"].ToString().Trim());
parms[100].Value = myRow["INLAND40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND40RH"].ToString().Trim());
parms[101].Value = myRow["ISPS40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS40RH"].ToString().Trim());
parms[102].Value = myRow["SZ40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ40RH"].ToString().Trim());
parms[103].Value = myRow["AG40RH"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG40RH"].ToString().Trim());
parms[104].Value = myRow["PIRICEVIAPORT"] == null ? "" : myRow["PIRICEVIAPORT"].ToString().Trim();
parms[105].Value = myRow["20RS0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20RS0"].ToString().Trim());
parms[106].Value = myRow["20RS1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20RS1"].ToString().Trim());
//parms[107].Value = myRow["20RS2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20RS2"].ToString().Trim());
//parms[108].Value = myRow["20RS3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["20RS3"].ToString().Trim());
parms[107].Value = 0;
parms[108].Value = 0;
parms[109].Value = myRow["PROFIT20RS1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20RS1"].ToString().Trim());
//parms[110].Value = myRow["PROFIT20RS2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20RS2"].ToString().Trim());
//parms[111].Value = myRow["PROFIT20RS3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT20RS3"].ToString().Trim());
parms[110].Value = 0;
parms[111].Value = 0;
parms[112].Value = myRow["OF20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF20RS"].ToString().Trim());
parms[113].Value = myRow["BAF20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF20RS"].ToString().Trim());
parms[114].Value = myRow["CAF20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF20RS"].ToString().Trim());
parms[115].Value = myRow["PSS20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS20RS"].ToString().Trim());
parms[116].Value = myRow["GRI20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI20RS"].ToString().Trim());
parms[117].Value = myRow["INLAND20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND20RS"].ToString().Trim());
parms[118].Value = myRow["ISPS20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS20RS"].ToString().Trim());
parms[119].Value = myRow["SZ20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ20RS"].ToString().Trim());
parms[120].Value = myRow["AG20RS"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG20RS"].ToString().Trim());
parms[121].Value = myRow["40NOR0"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40NOR0"].ToString().Trim());
parms[122].Value = myRow["40NOR1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40NOR1"].ToString().Trim());
//parms[123].Value = myRow["40NOR2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40NOR2"].ToString().Trim());
//parms[124].Value = myRow["40NOR3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["40NOR3"].ToString().Trim());
parms[123].Value = 0;
parms[124].Value = 0;
parms[125].Value = myRow["PROFIT40NOR1"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40NOR1"].ToString().Trim());
//parms[126].Value = myRow["PROFIT40NOR2"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40NOR2"].ToString().Trim());
//parms[127].Value = myRow["PROFIT40NOR3"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PROFIT40NOR3"].ToString().Trim());
parms[126].Value = 0;
parms[127].Value = 0;
parms[128].Value = myRow["OF40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["OF40NOR"].ToString().Trim());
parms[129].Value = myRow["BAF40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["BAF40NOR"].ToString().Trim());
parms[130].Value = myRow["CAF40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["CAF40NOR"].ToString().Trim());
parms[131].Value = myRow["PSS40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["PSS40NOR"].ToString().Trim());
parms[132].Value = myRow["GRI40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["GRI40NOR"].ToString().Trim());
parms[133].Value = myRow["INLAND40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["INLAND40NOR"].ToString().Trim());
parms[134].Value = myRow["ISPS40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["ISPS40NOR"].ToString().Trim());
parms[135].Value = myRow["SZ40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["SZ40NOR"].ToString().Trim());
parms[136].Value = myRow["AG40NOR"].ToString().Trim() == "" ? 0 : Decimal.Parse(myRow["AG40NOR"].ToString().Trim());
//有效期
string strEFFECTIVEDATE = ""; ;
string strEFFECTIVEDATE_name = "";
if (!myRow["EFFECTIVEDATE"].ToString().Trim().Equals(""))
{
strEFFECTIVEDATE = "'" + myRow["EFFECTIVEDATE"].ToString().Trim() + "',";
strEFFECTIVEDATE_name = "EFFECTIVEDATE,";
}
//
//有效期
string strVALIDDATE = ""; ;
string strVALIDDATE_name = "";
if (!myRow["VALIDDATE"].ToString().Trim().Equals(""))
{
strVALIDDATE = "'" + myRow["VALIDDATE"].ToString().Trim() + "',";
strVALIDDATE_name = "VALIDDATE,";
}
//
string SQL_INSERT_INFO = "insert into crm_price_carrier(GID,LOCKFLAG,PODLOAD,PORTDISCHARGE,DESTINATION,CARRIER,FORWARDER,ETD,TT,VIA,POC,SVC,LANE,CARRIERLANE,OWS,{0}{2}INPUTBY,COMMODITY,SC,NAMEAC,SICUT,CUSCLSG,CYCLSG,[20GP0],[20GP1],[20GP2],[20GP3],[40GP0],[40GP1],[40GP2],[40GP3],[40HQ0],[40HQ1],[40HQ2],[40HQ3],[45HQ0],[45HQ1],[45HQ2],[45HQ3],ISISSUE,PROFIT20GP1,PROFIT40GP1,PROFIT40HQ1,PROFIT45HQ1,PROFIT20GP2,PROFIT40GP2,PROFIT40HQ2,PROFIT45HQ2,PROFIT20GP3,PROFIT40GP3,PROFIT40HQ3,PROFIT45HQ3,OF20GP,BAF20GP,CAF20GP,PSS20GP,GRI20GP,INLAND20GP,ISPS20GP,SZ20GP,AG20GP,OF40GP,BAF40GP,CAF40GP,PSS40GP,GRI40GP,INLAND40GP,ISPS40GP,SZ40GP,AG40GP,OF40HQ,BAF40HQ,CAF40HQ,PSS40HQ,GRI40HQ,INLAND40HQ,ISPS40HQ,SZ40HQ,AG40HQ,OF45HQ,BAF45HQ,CAF45HQ,PSS45HQ,GRI45HQ,INLAND45HQ,ISPS45HQ,SZ45HQ,AG45HQ,REMARK,MODIFIEDUSER,CARRIERCN,BOOKINGFEE,CTNFEE,THCFEE,FILEFEE,LCLCOST,LCLPRICE,CISF,REMARK2,TYPE,CORPID,[40RH0],[40RH1],[40RH2],[40RH3],PROFIT40RH1,PROFIT40RH2,PROFIT40RH3,OF40RH,BAF40RH,CAF40RH,PSS40RH,GRI40RH,INLAND40RH,ISPS40RH,SZ40RH,AG40RH,PIRICEVIAPORT,[20RS0],[20RS1],[20RS2],[20RS3],[PROFIT20RS1],[PROFIT20RS2],[PROFIT20RS3],[OF20RS],[BAF20RS],[CAF20RS],[PSS20RS],[GRI20RS],[INLAND20RS],[ISPS20RS],[SZ20RS],[AG20RS],[40NOR0],[40NOR1],[40NOR2],[40NOR3],[PROFIT40NOR1],[PROFIT40NOR2],[PROFIT40NOR3],[OF40NOR],[BAF40NOR],[CAF40NOR],[PSS40NOR],[GRI40NOR],[INLAND40NOR],[ISPS40NOR],[SZ40NOR],[AG40NOR]) "
+ " values(@GID,0,@PODLOAD,@PORTDISCHARGE,@DESTINATION,@CARRIER,@FORWARDER,@ETD,@TT,@VIA,@POC,@SVC,@LANE,@CARRIERLANE,@OWS,{1}{3}@INPUTBY,@COMMODITY,@SC,@NAMEAC,@SICUT,@CUSCLSG,@CYCLSG,@D_20GP0,@D_20GP1,@D_20GP2,@D_20GP3,@D_40GP0,@D_40GP1,@D_40GP2,@D_40GP3,@D_40HQ0,@D_40HQ1,@D_40HQ2,@D_40HQ3,@D_45HQ0,@D_45HQ1,@D_45HQ2,@D_45HQ3,0,@PROFIT20GP1,@PROFIT40GP1,@PROFIT40HQ1,@PROFIT45HQ1,@PROFIT20GP2,@PROFIT40GP2,@PROFIT40HQ2,@PROFIT45HQ2,@PROFIT20GP3,@PROFIT40GP3,@PROFIT40HQ3,@PROFIT45HQ3,@OF20GP,@BAF20GP,@CAF20GP,@PSS20GP,@GRI20GP,@INLAND20GP,@ISPS20GP,@SZ20GP,@AG20GP,@OF40GP,@BAF40GP,@CAF40GP,@PSS40GP,@GRI40GP,@INLAND40GP,@ISPS40GP,@SZ40GP,@AG40GP,@OF40HQ,@BAF40HQ,@CAF40HQ,@PSS40HQ,@GRI40HQ,@INLAND40HQ,@ISPS40HQ,@SZ40HQ,@AG40HQ,@OF45HQ,@BAF45HQ,@CAF45HQ,@PSS45HQ,@GRI45HQ,@INLAND45HQ,@ISPS45HQ,@SZ45HQ,@AG45HQ,@REMARK,@MODIFIEDUSER,'','','','','','','','','','FCL',@CORPID,@D_40RH0,@D_40RH1,@D_40RH2,@D_40RH3,@PROFIT40RH1,@PROFIT40RH2,@PROFIT40RH3,@OF40RH,@BAF40RH,@CAF40RH,@PSS40RH,@GRI40RH,@INLAND40RH,@ISPS40RH,@SZ40RH,@AG40RH,@PIRICEVIAPORT,@D_20RS0,@D_20RS1,@D_20RS2,@D_20RS3,@PROFIT20RS1,@PROFIT20RS2,@PROFIT20RS3,@OF20RS,@BAF20RS,@CAF20RS,@PSS20RS,@GRI20RS,@INLAND20RS,@ISPS20RS,@SZ20RS,@AG20RS,@D_40NOR0,@D_40NOR1,@D_40NOR2,@D_40NOR3,@PROFIT40NOR1,@PROFIT40NOR2,@PROFIT40NOR3,@OF40NOR,@BAF40NOR,@CAF40NOR,@PSS40NOR,@GRI40NOR,@INLAND40NOR,@ISPS40NOR,@SZ40NOR,@AG40NOR)";
//
SQL_INSERT_INFO = String.Format(SQL_INSERT_INFO, strEFFECTIVEDATE_name, strEFFECTIVEDATE, strVALIDDATE_name, strVALIDDATE);
#endregion
//iResult = SqlHelper.ExecuteNonQuery(sqlTran, CommandType.Text, SQL_INSERT_INFO, parms);
SqlConnection conn = new SqlConnection(SqlHelper.ConnectionStringLocalTransaction);
iResult = SqlHelper.ExecuteNonQuery(conn, CommandType.Text, SQL_INSERT_INFO, parms);
conn.Close();
if (iResult > 0)
{
iResult = 1;
}
else
{
iResult = -7;//插入失败
}
}
}
else
{
iResult = -1;
}
iResult = 1;//状态为1表示插入成功
}
catch (Exception execError)
{
iResult = -1;//有异常,插入失败
iResult = -2;//插入异常,事务已回滚成功
throw execError;
}
}
else
{
iResult = -9;//无符合条件的数据
}
}
}
}
else
{
iResult = -1;
}
return iResult;
}
protected String getBSNO()
{
string strBSNO = Guid.NewGuid().ToString();
strBSNO = strBSNO.Replace("-", "");
strBSNO = "CarE" + strBSNO;
return strBSNO;
}
//
}
}