临时发布20240103
ddlucky 1 year ago
parent 57f749d062
commit 74c8dab139

@ -73,6 +73,20 @@ namespace DSWeb.Areas.CommMng.Controllers
}
}
public JsonResult GetAllUserList(string condition, string dbname = "")
{
List<UserRefModel> evList = BasicDataRefDAL.GetAllUserList(condition, dbname);
if (evList.Count == 0)
{
return Json(new { success = false });
}
else
{
return Json(new { success = true, data = evList.ToList() });
}
}
public JsonResult GetUserRefInUseList(string condition, string dbname = "")
{
if (!string.IsNullOrWhiteSpace(condition)) {

@ -173,6 +173,19 @@ namespace DSWeb.Areas.CommMng.DAL
}
return SetUserRefData(strSql, dbname);
}
static public List<UserRefModel> GetAllUserList(string strCondition, string dbname = "")
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append("USERID GID,CODENAME UserCode,SHOWNAME UserName,CODENAME+'-'+SHOWNAME CodeAndName,COMPANYID CORPID,DEPTGID,DEPTNAME");
strSql.Append(" from VW_user_all ");
if (!string.IsNullOrEmpty(strCondition))
{
strSql.Append(" where " + strCondition);
}
return SetUserRefData(strSql, dbname);
}
private static List<UserRefModel> SetUserRefData(StringBuilder strSql, string dbname = "")
{
@ -3560,6 +3573,14 @@ namespace DSWeb.Areas.CommMng.DAL
private static List<CodeFrtModel> SetCodeFrtData(String strSql)
{
var headList = new List<CodeFrtModel>();
var blankrec = new CodeFrtModel()
{
FEID = "",
FRT = "",
FRTCNAME = "",
EDICODE = ""
};
headList.Add(blankrec);
Database db = DatabaseFactory.CreateDatabase();
using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql))
{

@ -888,7 +888,234 @@ namespace DSWeb.MvcShipping.Controllers
}
}
public ContentResult SaleCustListData(int start, int limit, string condition, string sort, string printstr, string sortstr, string datetype, string startmonth, string endmonth, string feetype)
{
var strDa = GetRangDAStr("index", Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]));
if (!string.IsNullOrEmpty(strDa))
{
if (!string.IsNullOrEmpty(condition))
{
condition = condition + " and " + strDa;
}
else
{
condition = strDa;
}
}
var RPTPRNOCANCEL = MsSysParamSetDAL.GetData("PARAMNAME='RPTPRNOCANCEL'");
if (RPTPRNOCANCEL.PARAMVALUE == "1")
{
if (!string.IsNullOrEmpty(condition))
{
condition = condition + " and isnull(B.ISCANCEL,0)<>1 ";//退舱
}
else
{
condition = " isnull(B.ISCANCEL,0)<>1 ";//退舱
}
}
var monthlist = GetMonthList(datetype, startmonth, endmonth);
var Fieldset = GetProfitFieldSet(Convert.ToString(Session["COMPANYID"]));
var PROFITRATEDR = MsSysParamSetDAL.GetData("PARAMNAME='PROFITRATEDR'");
var strSql = new StringBuilder();
strSql.Append("SELECT B.SALE+'_'+B.CUSTOMERNAME SALE");
foreach (var enumValue in monthlist)
{
if (feetype == "1")
{
if (Fieldset.RMBDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXRMBDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "RMBDR ");
if (Fieldset.RMBCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXRMBCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "RMBCR ");
if (Fieldset.USDDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXUSDDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "USDDR ");
if (Fieldset.USDCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXUSDCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "USDCR ");
if (Fieldset.OTDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15),B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXOTDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "OTDR ");
if (Fieldset.OTCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXOTCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "OTCR ");
if (Fieldset.TTLDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXTTLDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "TTLDR ");
if (Fieldset.TTLCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXTTLCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "TTLCR ");
if (Fieldset.RMBPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXRMBDR-G.NOTAXRMBCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "RMBPROFIT ");
if (Fieldset.USDPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXUSDDR-G.NOTAXUSDCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "USDPROFIT ");
if (Fieldset.OTPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXOTDR-G.NOTAXOTCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "OTPROFIT ");
if (Fieldset.TTLPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXTTLDR-G.NOTAXTTLCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "TTLPROFIT ");
if (Fieldset.PROFITRATE)
{
if (PROFITRATEDR.PARAMVALUE != "1")
{
strSql.Append(", (CASE WHEN (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXTTLDR else 0 end)= 0) THEN 0 ELSE");
strSql.Append(" CONVERT(NUMERIC(18,2),ltrim(str((sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXTTLDR-G.NOTAXTTLCR else 0 end)) / (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXTTLDR else 0 end)) * 100, 10, 2))) END) AS ZL" + enumValue.MONTHNO.ToString() + "PROFITRATE");
}
else
strSql.Append(", (CASE WHEN (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXTTLCR else 0 end)= 0) THEN 0 ELSE");
strSql.Append(" CONVERT(NUMERIC(18,2),ltrim(str((sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXTTLDR-G.NOTAXTTLCR else 0 end)) / (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOTAXTTLCR else 0 end)) * 100, 10, 2))) END) AS ZL" + enumValue.MONTHNO.ToString() + "PROFITRATE");
}
}
else if (feetype == "2")
{
if (Fieldset.RMBDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXRMBDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "RMBDR ");
if (Fieldset.RMBCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXRMBCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "RMBCR ");
if (Fieldset.USDDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXUSDDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "USDDR ");
if (Fieldset.USDCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXUSDCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "USDCR ");
if (Fieldset.OTDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15),B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXOTDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "OTDR ");
if (Fieldset.OTCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXOTCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "OTCR ");
if (Fieldset.TTLDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXTTLDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "TTLDR ");
if (Fieldset.TTLCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXTTLCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "TTLCR ");
if (Fieldset.RMBPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXRMBDR-G.NOACCTAXRMBCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "RMBPROFIT ");
if (Fieldset.USDPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXUSDDR-G.NOACCTAXUSDCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "USDPROFIT ");
if (Fieldset.OTPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXOTDR-G.NOACCTAXOTCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "OTPROFIT ");
if (Fieldset.TTLPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXTTLDR-G.NOACCTAXTTLCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "TTLPROFIT ");
if (Fieldset.PROFITRATE)
{
if (PROFITRATEDR.PARAMVALUE != "1")
{
strSql.Append(", (CASE WHEN (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXTTLDR else 0 end)= 0) THEN 0 ELSE");
strSql.Append(" CONVERT(NUMERIC(18,2),ltrim(str((sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXTTLDR-G.NOACCTAXTTLCR else 0 end)) / (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXTTLDR else 0 end)) * 100, 10, 2))) END) AS ZL" + enumValue.MONTHNO.ToString() + "PROFITRATE");
}
else
strSql.Append(", (CASE WHEN (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXTTLCR else 0 end)= 0) THEN 0 ELSE");
strSql.Append(" CONVERT(NUMERIC(18,2),ltrim(str((sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXTTLDR-G.NOACCTAXTTLCR else 0 end)) / (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.NOACCTAXTTLCR else 0 end)) * 100, 10, 2))) END) AS ZL" + enumValue.MONTHNO.ToString() + "PROFITRATE");
}
}
else
{
if (Fieldset.RMBDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.RMBDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "RMBDR ");
if (Fieldset.RMBCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.RMBCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "RMBCR ");
if (Fieldset.USDDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.USDDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "USDDR ");
if (Fieldset.USDCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.USDCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "USDCR ");
if (Fieldset.OTDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.OTDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "OTDR ");
if (Fieldset.OTCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.OTCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "OTCR ");
if (Fieldset.TTLDR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.TTLDR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "TTLDR ");
if (Fieldset.TTLCR)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.TTLCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "TTLCR ");
if (Fieldset.RMBPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.RMBDR-G.RMBCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "RMBPROFIT ");
if (Fieldset.USDPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.USDDR-G.USDCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "USDPROFIT ");
if (Fieldset.OTPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.OTDR-G.OTCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "OTPROFIT ");
if (Fieldset.TTLPROFIT)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.TTLDR-G.TTLCR else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "TTLPROFIT ");
if (Fieldset.PROFITRATE)
{
if (PROFITRATEDR.PARAMVALUE != "1")
{
strSql.Append(", (CASE WHEN (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.TTLDR else 0 end)= 0) THEN 0 ELSE");
strSql.Append(" CONVERT(NUMERIC(18,2),ltrim(str((sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.TTLDR-G.TTLCR else 0 end)) / (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.TTLDR else 0 end)) * 100, 10, 2))) END) AS ZL" + enumValue.MONTHNO.ToString() + "PROFITRATE");
}
else
strSql.Append(", (CASE WHEN (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.TTLCR else 0 end)= 0) THEN 0 ELSE");
strSql.Append(" CONVERT(NUMERIC(18,2),ltrim(str((sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.TTLDR-G.TTLCR else 0 end)) / (sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then G.TTLCR else 0 end)) * 100, 10, 2))) END) AS ZL" + enumValue.MONTHNO.ToString() + "PROFITRATE");
}
}
if (Fieldset.TEU)
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' then B.TEU else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "TEU ");
strSql.Append(",sum(case when SUBSTRING(CONVERT(char(15), B." + datetype + ", 111), 1, 7)='" + enumValue.MONTHFIELDNAME + "' and B.BSNO=B.MASTERNO then 1 else 0 end) as ZL" + enumValue.MONTHNO.ToString() + "BILLCOUNT ");
}
strSql.Append(" FROM V_OP_BILL B ");
strSql.Append("LEFT JOIN v_op_gain_sum_tax G ON (G.BSNO=B.BSNO) ");
if (!string.IsNullOrEmpty(condition))
{
strSql.Append(" Where " + condition);
}
strSql.Append(" Group by B.SALE,B.CUSTOMERNAME ");
if ((!string.IsNullOrEmpty(printstr)) && (printstr == "true"))
{
if (!string.IsNullOrEmpty(sortstr))
{
strSql.Append(" order by B.SALE,B.CUSTOMERNAME ," + sortstr);
}
else
{
strSql.Append(" order by B.SALE,B.CUSTOMERNAME ");
}
var jsonRespose = new JsonResponse
{
Success = true,
Message = "完成",
Data = strSql.ToString()
};
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
}
else
{
var sortstring = DatasetSort.Getsortstring(sort);
if (!string.IsNullOrEmpty(sortstring))
{
strSql.Append(" order by " + sortstring);
}
else
{
strSql.Append(" order by B.SALE,B.CUSTOMERNAME ");
}
var dbparams = new List<CustomDbParamter>();
var paramps_sSQL = new CustomDbParamter();
paramps_sSQL.ParameterName = "@sSQL";
paramps_sSQL.DbType = DbType.String;
paramps_sSQL.Direction = ParameterDirection.Input;
paramps_sSQL.Value = strSql.ToString();
dbparams.Add(paramps_sSQL);
var dbRptResult = PubSysDAL.GetMsSqlPrcDataSet("sMsExesqlQry", dbparams, "Result_Set");
var json = RptHelper.GetRptJsonResult(start, limit, dbRptResult, "Result_Set", true);
return new ContentResult() { Content = json };
}
}
public ContentResult OpListData(int start, int limit, string condition, string sort, string printstr, string sortstr, string datetype, string startmonth, string endmonth, string feetype)
{

@ -199,6 +199,11 @@ namespace DSWeb.MvcShipping.Controllers
var cdc = new CommonDataContext();
if (string.IsNullOrWhiteSpace(headData.BSNO)) {
headData.BSNO= "topseae" + Guid.NewGuid().ToString();
}
if (headData.MBLNO != "" && headData.MBLNO != null)
{
var ct = MsSeaeOrderDAL.GetRdCount("BSNO<>'" + headData.BSNO + "' AND MBLNO='" + headData.MBLNO + "' and ORSTATUS<>'4'");

@ -241,7 +241,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeAutoDuiDAL
strSql.Append(" ,b.DOC,b.SALEDEPT,(select name from company where gid= b.SALECORPID)SALECORP ");
strSql.Append(" FROM CH_FEE F ");
strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) ");
strSql.Append(" where F.AMOUNT<>F.SETTLEMENT and F.CUSTOMERNAME='" + CUSTOMERNAME + "' and EXISTS (select 1 from CH_FEE_AutoDuiDetail fd where (fd.MBLNO=B.MBLNO OR fd.MBLNO=B.HBLNO) and fd.BSNO='" + AutoDui_GID + "') ");
strSql.Append(" where F.AMOUNT<>F.SETTLEMENT and F.CUSTOMERNAME='" + CUSTOMERNAME + "' and EXISTS (select 1 from CH_FEE_AutoDuiDetail fd where (fd.MBLNO=B.MBLNO OR fd.MBLNO=B.HBLNO) and fd.BSNO='" + AutoDui_GID + "') and isnull(b.MBLNO,'')<>'' and isnull(b.iscancel,0)<>1 ");
if (HAVEDEBIT == "0") {
strSql.Append(" and isnull(f.ISDEBIT,0)=0 ");
}
@ -415,6 +415,23 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeAutoDuiDAL
None
}
/// <summary>
/// 处理excel导入的对账单
/// </summary>
/// <param name="request"></param>
/// <param name="table"></param>
/// <param name="msg"></param>
/// <param name="InsertCount"></param>
/// <param name="UpdateCount"></param>
/// <param name="AutoDui_GID"></param>
/// <param name="CUSTOMERNAME"></param>
/// <param name="FEETYPE"></param>
/// <param name="headList"></param>
/// <param name="userid"></param>
/// <param name="username"></param>
/// <param name="companyid"></param>
/// <returns></returns>
/// <exception cref="ArgumentNullException"></exception>
public static bool ImportExcelData ( HttpRequestBase request, DataTable table, out string msg,
out Int32 InsertCount, out Int32 UpdateCount, string AutoDui_GID, string CUSTOMERNAME, string FEETYPE, out List<CH_FEE_AutoDuiDetailmb> headList, string userid, string username, string companyid )
{
@ -578,38 +595,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeAutoDuiDAL
headList.Add(_Detail);
//continue;
//}
/*
_Detail.L_RMBAMOUNT = L_RMBAMOUNT;
_Detail.L_USDAMOUNT = GetCustFee(CUSTOMERNAME, _Detail.MBLNO, FEETYPE, "USD", headdate.HAVEDEBIT);
//var _RowState = RowState.Insert;
//string strCheckRow = "select gid from CH_FEE_AutoDuiDetail where BSNO = '" + AutoDui_GID + "' and MBLNO='" + _Detail.MBLNO + "' '" ;
//object statusObj = SqlHelper.ExecuteScalar(db.ConnectionString, CommandType.Text, strCheckRow, null);
//var gid = Guid.NewGuid().ToString("N").ToUpper();
var _oldDetailList = GetBodyList(" BSNO = '" + AutoDui_GID + "' and MBLNO='" + _Detail.MBLNO + "' ");
if (_oldDetailList.Count>0){//如果已经存在相同提单号的
_Detail=_oldDetailList[0];
//_Detail.BSNO="";
_Detail.RMBAMOUNT= Convert.ToString(RMBAMOUNT);
_Detail.USDAMOUNT= Convert.ToString(USDAMOUNT);
//_Detail.L_RMBAMOUNT = GetCustFee(CUSTOMERNAME, _Detail.MBLNO, FEETYPE, "RMB", headdate.HAVEDEBIT);
//_Detail.L_USDAMOUNT = GetCustFee(CUSTOMERNAME, _Detail.MBLNO, FEETYPE, "USD", headdate.HAVEDEBIT);
_Detail.L_RMBAMOUNT = "0";
_Detail.L_USDAMOUNT = "0";
UpdateCount++;
}
else
{//如果不存在
_Detail.BSNO="";
InsertCount++;
}*/
/*
if (RMBAMOUNT == Convert.ToDecimal(_Detail.L_RMBAMOUNT) && USDAMOUNT == Convert.ToDecimal(_Detail.L_USDAMOUNT)) {
_Detail.ISOK = "1";
_Detail.REMARK2 = "自动对账成功";
}*/
//headList.Add(_Detail);
@ -627,7 +613,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeAutoDuiDAL
);
T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA();
//var blUpSQL = " update CH_FEE_AutoDuiDetail set B_BSNO=(select top 1 BSNO from v_op_bS where (MBLNO=D.b_mblno or HBLNO=D.MBLNO) and OPLBNAME in('海运进口','海运出口','空运进口','空运出口') ) FROM CH_FEE_AutoDuiDetail d where bsno='" + duihead.GID+"'";
var blUpSQL = " update CH_FEE_AutoDuiDetail set B_BSNO=(select top 1 BSNO from v_op_bS where (MBLNO=D.mblno or HBLNO=D.MBLNO) ) FROM CH_FEE_AutoDuiDetail d where bsno='" + duihead.GID + "'";
var blUpSQL = " update CH_FEE_AutoDuiDetail set B_BSNO=(select top 1 BSNO from v_op_bS where (MBLNO=D.mblno or HBLNO=D.MBLNO) and isnull(MBLNO,'')<>'' ) FROM CH_FEE_AutoDuiDetail d where bsno='" + duihead.GID + "'";
bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL);
//
result = ReMake(duihead, userid, username, companyid);

@ -1873,7 +1873,7 @@ function ListToSqlStr(list) {
//#region 向用户下拉框中增加当前值,防止离职人员在编辑页中看不到
function UserStoreAddCurrValue(store,value) {
if (value != '') {
if (value && store) {
var recordCustCode = Ext.create('DsShipping.ux.UserRefModel', {
GId: NewGuid(),
UserCode: value,

@ -4877,7 +4877,7 @@ Ext.extend(Shipping.MsRptNoTotalIndex, Ext.Panel, {
this.storeSalesCode = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
proxy: { url: '/CommMng/BasicDataRef/GetAllUserList' }
});
this.storeSalesCode.load();
@ -5394,6 +5394,91 @@ Ext.extend(Shipping.MsRptNoTotalIndex, Ext.Panel, {
this.StoreSubComp = Ext.create('DsExt.ux.RefTableStore', {
model: 'SubComp',
proxy: { url: '/MvcShipping/MsBaseInfo/GetCompanyEN' }
});
this.StoreSubComp.load({ params: { condition: "" } });
this.comboxSubComp = Ext.create('Ext.ux.form.field.BoxSelect', {
fieldLabel: '所属分部',
store: this.StoreSubComp,
name: 'SUBCOMP',
queryMode: 'local',
flex: 2.5,
autosize: true,
valueField: 'GID',
displayField: 'NAME',
enableKeyEvents: true,
listeners: {
keyup: function (field, e) {
if (e.getKey() == e.ENTER) {
_this.onRefreshClick();
}
},
'change': function (combo, records, eOpts) {
if (records.length > 0) {
var str = ListToSqlStr(combo.getValue());
//alert(str);
//载入部门
_this.storeDEPT.load({ params: { condition: "LinkId in(" + str + ")" } });
} else {
_this.comboxDEPT.setValue("");
_this.storeDEPT.load({ params: { condition: "1=2" } });
}
}
}
});
this.storeDEPT = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.DeptModel',
proxy: { url: '/CommMng/BasicDataRef/GetDeptList_All_Group' }
});
//this.storeDEPT.load({ params: { condition: "" } });
this.comboxDEPT = Ext.create('Ext.ux.form.field.BoxSelect', {
fieldLabel: '所属部门',
store: this.storeDEPT,
queryMode: 'local',
flex: 2.5,
autosize: true,
name: 'SUBDEPT',
valueField: 'DeptName',
displayField: 'DeptName'
});
Ext.define('CODE_FRT', {
extend: 'Ext.data.Model',
idProperty: 'FRT',
fields: [
{ name: 'FRT', type: 'string' },
{ name: 'FRTCNAME', type: 'string' },
{ name: 'EDICODE', type: 'string' }
]
});
this.storeFrt = Ext.create('DsExt.ux.RefTableStore', {
model: 'CODE_FRT',
proxy: { url: '/CommMng/BasicDataRef/GetCodeFrtList' }
});
this.storeFrt.load({ params: { condition: "" } });
this.comboxBLFRT = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '付费方式',
store: this.storeFrt,
forceSelection: true,
name: 'BLFRT',
valueField: 'FRT',
displayField: 'FRT'
});
//#endregion
@ -5470,7 +5555,9 @@ Ext.extend(Shipping.MsRptNoTotalIndex, Ext.Panel, {
defaultType: 'textfield',
items: [this.comboxBsType, this.comboxSalesCode, this.comboxCustCode, this.comboxFeeLock, this.comboxINVSTATUS, this.comboxISADVANCEDPAY, this.comboxISVOUALLNO, this.CheckAmend
]
}, {
}
, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
@ -5550,6 +5637,16 @@ Ext.extend(Shipping.MsRptNoTotalIndex, Ext.Panel, {
}
]
}
, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [
this.comboxBLFRT,
this.comboxSubComp, this.comboxDEPT
]
}
]//end items(fieldset 1)
}//end fieldset 1
]//end root items
@ -5678,7 +5775,7 @@ Ext.extend(Shipping.MsRptNoTotalIndex, Ext.Panel, {
this.panelSearch = new Ext.Panel({
layout: "border",
region: "north",
height: 121,
height: 147,
items: [this.formSearch]
});
@ -5821,6 +5918,7 @@ Ext.extend(Shipping.MsRptNoTotalIndex, Ext.Panel, {
Ext.apply(store.proxy.extraParams, { condition: Drsql, amendstr: amendstr });
}, this);
this.storeListCr.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
@ -6849,6 +6947,26 @@ Ext.extend(Shipping.MsRptNoTotalIndex, Ext.Panel, {
}
var SUBCOMP = form.findField('SUBCOMP').getValue();
if (SUBCOMP) {
compstr = ListToSqlStr(SUBCOMP);
sql = sql + getAndConSql(sql, compstr, "B.SALECORPID in(" + compstr + ")");
}
var SUBDEPT = form.findField('SUBDEPT').getValue();
if (SUBDEPT) {
deptstr = ListToSqlStr(SUBDEPT);
sql = sql + getAndConSql(sql, deptstr, "B.SALEDEPT in(" + deptstr + ")");
}
var BLFRT = form.findField('BLFRT').getValue();
sql = sql + getAndConSql(sql, BLFRT, "B.BLFRT='" + BLFRT + "'");
return sql;
},

@ -39,8 +39,6 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
this.formname = 'MsRptOpProfitMonthIndex';
//定义数据集
this.storeList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
@ -1094,6 +1092,47 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
}, this);
//#region 销售委托单位
this.storeSaleCustList = null;
//定义Grid
this.girdcolumssalecust = [{
sortable: true,
dataIndex: 'SALE',
header: '销售委托单位',
width: 100
}];
this.gridListSaleCust = new Ext.grid.GridPanel({
store: this.storeSaleCustList,
enableHdMenu: false,
region: 'center',
loadMask: { msg: "数据加载中,请稍等..." },
trackMouseOver: true,
disableSelection: false,
columns: this.girdcolumssalecust,
// paging bar on the bottom
bbar: Ext.create('Ext.PagingToolbar', {
store: this.storeSaleCustList,
displayInfo: true,
displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
emptyMsg: "没有数据"
})
});
this.gridListSaleCust.addListener('sortchange', function (ct, column, direction, eOpts) {
this.salecustsumsortfield = column.dataIndex;
this.salecustsumsortdire = direction;
}, this);
//#endregion
this.storeSaleCorpList = null;
@ -1283,47 +1322,6 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
}, this);
// this.storeSaleCustList = null;
// //定义Grid
// this.girdcolumssalecust = [{
// sortable: true,
// dataIndex: 'SALE',
// header: '揽货人',
// width: 100
// }, {
// sortable: true,
// dataIndex: 'CUSTNAME',
// header: '客户',
// width: 100
// }
// ];
// this.gridListSaleCust = new Ext.grid.GridPanel({
// store: this.storeSaleCustList,
// enableHdMenu: false,
// region: 'center',
// loadMask: { msg: "数据加载中,请稍等..." },
// trackMouseOver: true,
// disableSelection: false,
// columns: this.girdcolumssalecust,
// // paging bar on the bottom
// bbar: Ext.create('Ext.PagingToolbar', {
// store: this.storeSaleCustList,
// displayInfo: true,
// displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录',
// emptyMsg: "没有数据"
// })
// });
// this.gridListSaleCust.addListener('sortchange', function (ct, column, direction, eOpts) {
// this.salecustsumsortfield = column.dataIndex;
// this.salecustsumsortdire = direction;
// }, this);
this.storeBsSourceList = null;
@ -1801,15 +1799,6 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
defaultType: 'textfield',
items: [this.comboxOp, this.comboxSalesCode, this.comboxOpLb, this.comboxBsType, this.comboxCARRIER, this.comboxYARD
]
}, {
xtype: 'container',
layout: 'hbox',
defaultType: 'textfield',
items: [
//, this.comboxSubComp,
this.comboxCorp,
this.comboxSubComp, this.comboxDEPT
]
}
]//end items(fieldset 1)
}//end fieldset 1
@ -1990,6 +1979,14 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
frame: true,
items: [this.gridListSale]
});
this.panelSaleCustSum = new Ext.Panel({
title: '销售委托单位',
layout: "border",
region: 'center',
margin: '0 0',
frame: true,
items: [this.gridListSaleCust]
});
this.panelSaleDeptSum = new Ext.Panel({
title: Zi.LAN.SALEDEPT,
layout: "border",
@ -2060,14 +2057,6 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
items: [this.gridListLane]
});
// this.panelSaleCustSum = new Ext.Panel({
// title: '揽货人客户',
// layout: "border",
// region: 'center',
// margin: '0 0',
// frame: true,
// items: [this.gridListSaleCust]
// });
this.panelBsSourceSum = new Ext.Panel({
title: Zi.LAN.BSSOURCE,
@ -2117,7 +2106,7 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
this.panelSaleCorpSum,
this.panelOpSum,
this.panelOpDeptSum,
// this.panelSaleCustSum,
this.panelSaleCustSum,
this.panelBsSourceSum,
this.panelBsSourceDetailSum,
this.panelCarrierSum,
@ -2171,10 +2160,9 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
var custfield = [
{ name: 'CUSTOMERNAME', type: 'string' }
];
// var salecustfield = [
// { name: 'SALE', type: 'string' },
// { name: 'CUSTNAME', type: 'string' }
// ];
var salecustfield = [
{ name: 'SALE', type: 'string' }
];
var bssourcefield = [
{ name: 'BSSOURCE', type: 'string' }
];
@ -2531,7 +2519,7 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
opfield.push(myfield[k]);
opdeptfield.push(myfield[k]);
custfield.push(myfield[k]);
// salecustfield.push(myfield[k]);
salecustfield.push(myfield[k]);
bssourcefield.push(myfield[k]);
bssourcedetailfield.push(myfield[k]);
carrierfield.push(myfield[k]);
@ -2559,10 +2547,25 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
}
});
this.storeSaleList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'salemodel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptOpProfitMonth/SaleCustListData',
reader: {
root: 'data',
totalProperty: 'totalCount'
}
}
});
Ext.define('saledeptmodel', {
Ext.define('salecustmodel', {
extend: 'Ext.data.Model',
fields: saledeptfield
fields: salecustfield
});
this.storeSaleDeptList = Ext.create('Ext.data.Store', {
@ -2656,24 +2659,25 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
}
}
});
// Ext.define('salecustmodel', {
// extend: 'Ext.data.Model',
// fields: salecustfield
// });
// this.storeSaleCustList = Ext.create('Ext.data.Store', {
// pageSize: this.PageSize,
// model: 'salecustmodel',
// remoteSort: true,
// proxy: {
// type: 'ajax',
// url: '/MvcShipping/MsRptOpProfitMonth/SaleCustListData',
// reader: {
// root: 'data',
// totalProperty: 'totalCount'
// }
// }
// });
Ext.define('salecustmodel', {
extend: 'Ext.data.Model',
fields: salecustfield
});
this.storeSaleCustList = Ext.create('Ext.data.Store', {
pageSize: this.PageSize,
model: 'salecustmodel',
remoteSort: true,
proxy: {
type: 'ajax',
url: '/MvcShipping/MsRptOpProfitMonth/SaleCustListData',
reader: {
root: 'data',
totalProperty: 'totalCount'
}
}
});
Ext.define('bssourcemodel', {
extend: 'Ext.data.Model',
@ -2796,7 +2800,8 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
this.girdcolumsop.push(zlcolumn[k]);
this.girdcolumsopdept.push(zlcolumn[k]);
this.girdcolumssalecorp.push(zlcolumn[k]);
// this.girdcolumssalecust.push(zlcolumn[k]);
this.girdcolumssalecust.push(zlcolumn[k]);
this.girdcolumscust.push(zlcolumn[k]);
this.girdcolumsbssource.push(zlcolumn[k]);
this.girdcolumsbssourcedetail.push(zlcolumn[k]);
@ -2811,7 +2816,8 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
this.gridListOp.reconfigure(this.storeOpList, this.girdcolumsop);
this.gridListOpDept.reconfigure(this.storeOpDeptList, this.girdcolumsopdept);
this.gridListCust.reconfigure(this.storeCustList, this.girdcolumscust);
// this.gridListSaleCust.reconfigure(this.storeSaleCustList, this.girdcolumssalecust);
this.gridListSaleCust.reconfigure(this.storeSaleCustList, this.girdcolumssalecust);
this.gridListBsSource.reconfigure(this.storeBsSourceList, this.girdcolumsbssource);
this.gridListBsSourceDetail.reconfigure(this.storeBsSourceDetailList, this.girdcolumsbssourcedetail);
this.gridListCarrier.reconfigure(this.storeCarrierList, this.girdcolumscarrier);
@ -2850,6 +2856,13 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelSaleCustSum) {
this.storeSaleCustList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
scope: this
});
}
if (this.tabpanel.getActiveTab() == this.panelOpSum) {
this.storeOpList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
@ -2900,6 +2913,10 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
});
}
this.storeSumList.load({
params: { start: 0, limit: this.PageSize, condition: sql, datetype: datetype, startmonth: startdate, endmonth: enddate, feetype: feetype },
waitMsg: "正在查询数据...",
@ -2934,13 +2951,13 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, {
}, this);
// this.storeSaleCustList.on('beforeload', function (store) {
// if (!this.checkSearchCondition())
// return;
this.storeSaleCustList.on('beforeload', function (store) {
if (!this.checkSearchCondition())
return;
// var sql = this.getCondition();
// Ext.apply(store.proxy.extraParams, { condition: sql });
// }, this);
var sql = this.getCondition();
Ext.apply(store.proxy.extraParams, { condition: sql });
}, this);
this.storeBsSourceList.on('beforeload', function (store) {
var sql = this.sqlcontext;

@ -191,6 +191,23 @@ Ext.extend(Shipping.MsSeaeOrderEdit, Ext.Panel, {
displayField: 'CodeAndName'
});
this.storeAUDITOPERATOR2 = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsShipping.ux.UserRefModel',
proxy: { url: '/CommMng/BasicDataRef/GetUserRefList' }
});
this.storeAUDITOPERATOR2.load();
this.comboxAUDITOPERATOR2 = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '确认订舱',
store: this.storeAUDITOPERATOR2,
matchFieldWidth: false,
forceSelection: true,
readOnly: true,
name: 'AUDITOPERATOR2',
valueField: 'UserName',
displayField: 'CodeAndName'
});
this.comboxAUDITOPERATOR2 = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '确认接单',
store: this.storeAUDITOPERATOR2,

@ -59,10 +59,12 @@ namespace JobReqWebData
using (SqlTransaction trans = db.BeginTransaction())
{
log.Debug("插入"+ row["MBLNO"].ToString()+"-"+ row["HBLNO"].ToString());
string sql = "insert into tb_order(BSNO,业务编号,提单号,分单号,客户名称,发货人,收货人,启运港,目的港,国家名称,船名,航次,箱量表示" +
",出口类型,运输条款,预计离港,实际离港,联系客户时间,建立时间,出号时间,操作时间,船公司,PO,品名,HS编码,件数文本,重量文本,尺码文本,保险联系人)";
sql = sql + " values (@BSNO,@CUSTNO,@MBLNO,@HBLNO,@CUSTOMERNAME,@SHIPPER,@CONSIGNEE,@PORTLOAD,@DESTINATION,@COUNTRY,@VESSEL,@VOYNO,@CNTRTOTAL,@BLTYPE" +
",@SERVICE,@ETD,@ATD,@LINKCUSTTIME,@CREATETIME,@MBLNOTIME,@BSDATE,@CARRIER,@PONO,@GOODSNAME,@HSCODE,@NOPKGS,@GROSSWEIGHT,@MEASUREMENT,@INSURANCEOP)";
string sql = "insert into tb_order(BSNO,业务编号,提单号,分单号,客户名称,发货人,收货人,启运港,目的港,国家名称" +
",船名,航次,箱量表示,出口类型,运输条款,预计离港,实际离港,联系客户时间,建立时间,出号时间" +
",操作时间,船公司,PO,品名,HS编码,件数文本,重量文本,尺码文本,保险联系人)";
sql = sql + " values (@BSNO,@CUSTNO,@MBLNO,@HBLNO,@CUSTOMERNAME,@SHIPPER,@CONSIGNEE,@PORTLOAD,@DESTINATION,@COUNTRY" +
",@VESSEL,@VOYNO,@CNTRTOTAL,@BLTYPE,@SERVICE,@ETD,@ATD,@LINKCUSTTIME,@CREATETIME,@MBLNOTIME" +
",@BSDATE,@CARRIER,@PONO,@GOODSNAME,@HSCODE,@NOPKGS,@GROSSWEIGHT,@MEASUREMENT,@INSURANCEOP)";
SqlCommand cmd = new SqlCommand(sql, db, trans);
cmd.Parameters.AddWithValue("@BSNO", row["AS_ID"].ToString());
cmd.Parameters.AddWithValue("@CUSTNO", row["CUSTNO"].ToString());

Loading…
Cancel
Save