/// <summary> /// 修改驳船分发规则 /// </summary> /// <param name="row"></param> public void UpdateBarge(string companyCode, string shipAgent, string shipOwner) { if (string.IsNullOrEmpty(companyCode)) { throw new Exception("请输入外理公司代码"); } if (string.IsNullOrEmpty(shipAgent)) { throw new Exception("请输入船代"); } if (string.IsNullOrEmpty(shipOwner)) { throw new Exception("请输入船东"); } //较验船东 bool isValid = ValidateBLL.CheckEnglishComma(shipOwner, 1, 10); if (!isValid) { throw new Exception("船东不合法。多个船东请用英文逗号隔开"); } CheckOwners(shipOwner, shipAgent, companyCode); DataSet1.T_OCRX_BARGERow row = new DataSet1.T_OCRX_BARGEDataTable().NewT_OCRX_BARGERow(); row.COMPANYCODE = companyCode; row.SHIPOWNER = shipOwner; row.SHIPAGENT = shipAgent; row.UPDATEDBY = Config.UserId; DAL.cctdbDAL.UpdateBarge(row); }
/// <summary> /// 新增班轮分发规则 /// </summary> /// <param name="row"></param> public void InsertVessel(string companyCode, string serviceCode, string lineCode) { if (string.IsNullOrEmpty(companyCode)) { throw new Exception("请输入外理公司代码"); } if (string.IsNullOrEmpty(serviceCode)) { throw new Exception("请输入航线"); } if (string.IsNullOrEmpty(lineCode)) { throw new Exception("请输入箱主"); } //较验箱主 bool isValid = ValidateBLL.CheckEnglishComma(lineCode, 1, 10); if (!isValid) { throw new Exception("箱主不合法。多个箱主请用英文逗号隔开"); } CheckLines(lineCode, serviceCode, companyCode); DataSet1.T_OCRX_VESSELRow row = new DataSet1.T_OCRX_VESSELDataTable().NewT_OCRX_VESSELRow(); row.COMPANYCODE = companyCode; row.SERVICECODE = serviceCode; row.LINECODE = lineCode; row.CREATEDBY = Config.UserId; DAL.cctdbDAL.InsertVessel(row); }