Exemple #1
0
 public int GetId(string ItemName, string ItemValue)
 {
     DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery("prcGetId");
     dquery.AddVarcharParam("@ItemName", 15, ItemName);
     dquery.AddVarcharParam("@ItemValue", 50, ItemValue);
     return(Convert.ToInt32(dquery.GetScalar()));
 }
        public void UpdateMUSTRecord(string mn, string yr)
        {
            string ProcName = "[exp].[sp_UpdateShipsoft]";
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);
            dquery.AddVarcharParam("@mn", 2, mn);
            dquery.AddVarcharParam("@yr", 4, yr);
            dquery.RunActionQuery();

        }
        public DataSet GetActiveOperator()
        {
            string ProcName = "[exp].[prcGetSlotOperatorList]";
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);

            dquery.AddVarcharParam("@SortExpression", 30, "");
            dquery.AddVarcharParam("@SortDirection", 4, "");

            return dquery.GetTables();
        }
        public DataSet GetCountry(params object[] sqlParam)
        {
            string ProcName = "admin.prcGetCountry";
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);

            dquery.AddIntegerParam("@pk_countryId", Convert.ToInt32(sqlParam[0]));
            dquery.AddVarcharParam("@CountryName", 200, Convert.ToString(sqlParam[1]));
            dquery.AddVarcharParam("@CountryAbbr", 2, Convert.ToString(sqlParam[2]));

            return dquery.GetTables();
        }
        public DataSet GetFreeDays(int FreeID, string Location, string Line, SearchCriteria searchCriteria)
        {
            string ProcName = "[admin].[prcGetFreeDaysList]";
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);

            dquery.AddIntegerParam("@pk_LinkId", FreeID);
            dquery.AddVarcharParam("@SchLocationName", 70, Location);
            dquery.AddVarcharParam("@SchLineName", 70, Line);
            dquery.AddVarcharParam("@SortExpression", 20, searchCriteria.SortExpression);
            dquery.AddVarcharParam("@SortDirection", 4, searchCriteria.SortDirection);
            return dquery.GetTables();
        }
        public DataSet GetPort(int pk_PortId, string PortCode, string PortName)
        {
            string ProcName = "admin.prcGetPort";
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);

            dquery.AddIntegerParam("@pk_PortId", pk_PortId);
            dquery.AddVarcharParam("@PortCode", 6, PortCode);
            dquery.AddVarcharParam("@PortName", 30, PortName);


            return dquery.GetTables();
        }
        public DataSet GetMLVoyage(int VoyageId, string voyageType, string VesselName, string voyageNo)
        {
            string ProcName = "prcGetMLVoyage";
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);

            dquery.AddIntegerParam("@pk_VoyageID", VoyageId);
            dquery.AddCharParam("@VoyageType", 1, voyageType.ToCharArray()[0]);
            dquery.AddVarcharParam("@vesselName", 70, VesselName);
            dquery.AddVarcharParam("@VoyageNo", 10, voyageNo);
          
            return dquery.GetTables();
        }
        public int AddEditVessel(int userID, bool isEdit, EMS.Entity.Vessel vessel)
        {
            string ProcName = "prcAddEditVessel";
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);
            dquery.AddIntegerParam("@userID", userID);
            dquery.AddBooleanParam("@isEdit", isEdit);

            dquery.AddIntegerParam("@pk_VesselId", vessel.VesselID);
            dquery.AddVarcharParam("@AgentCode", 10, vessel.AgentCode);
            // dquery.AddVarcharParam("@CallSign", 14, vessel.CallSign);
            dquery.AddVarcharParam("@IMONumber", 14, vessel.IMONumber);
            // dquery.AddIntegerParam("@LastPortCalled", vessel.LastPortCalled);
            dquery.AddVarcharParam("@MasterName", 60, vessel.MasterName);
            dquery.AddVarcharParam("@PANNo", 15, vessel.PANNo);
            dquery.AddVarcharParam("@ShippingLineCode", 10, vessel.ShippingLineCode);
            dquery.AddIntegerParam("@VesselFlag", vessel.VesselFlag);
            dquery.AddVarcharParam("@VesselName", 60, vessel.VesselName);
            dquery.AddIntegerParam("@VesselPrefix", vessel.VesselPrefix);
            dquery.AddVarcharParam("@CallSign", 14, vessel.CallSign);
            dquery.AddVarcharParam("@VesselAbbr", 2, vessel.VesselAbbr);


            return dquery.RunActionQuery();

        }
Exemple #9
0
        public static int AddEditMLVoyage(string voyageId, string vesselId, string MLvoyageNo, int _userId, bool isEdit)
        {
            int intvesselId = 0;

            int.TryParse(vesselId, out intvesselId);

            int intVoyageId = 0;

            int.TryParse(voyageId, out intVoyageId);

            //dtActivity = dtActivity == "" ? DateTime.Now.ToShortDateString() : dtActivity;
            //DateTime dt = Convert.ToDateTime(dtActivity);
            string ProcName = "prcAddEditMLVoyage";

            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);

            dquery.AddIntegerParam("@UserId", _userId);
            dquery.AddIntegerParam("@VoyageId", intVoyageId);
            dquery.AddIntegerParam("@vesselId", intvesselId);
            dquery.AddVarcharParam("@MLvoyageNo", 15, MLvoyageNo);
            //dquery.AddDateTimeParam("@ActivityDate", dt);
            //dquery.AddIntegerParam("@fk_PortID", fk_PortID);
            dquery.AddBooleanParam("@isEdit", isEdit);

            return(dquery.RunActionQuery());
        }
Exemple #10
0
        public int AddEditCountry(int userID, int pk_CountryID, string CountryName, string CountryAbbr, string GMT, string ISD, string Sector, bool isEdit)
        {
            string ProcName = "admin.prcAddEditCountry";

            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);
            dquery.AddIntegerParam("@userID", userID);
            dquery.AddIntegerParam("@pk_CountryId", pk_CountryID);
            dquery.AddVarcharParam("@CountryName", 200, CountryName);
            dquery.AddVarcharParam("@CountryAbbr", 5, CountryAbbr);
            dquery.AddVarcharParam("@GMT", 10, GMT);
            dquery.AddVarcharParam("@ISD", 10, ISD);
            dquery.AddVarcharParam("@Sector", 50, Sector);
            dquery.AddBooleanParam("@isEdit", isEdit);

            return(dquery.RunActionQuery());
        }
Exemple #11
0
        public static DataSet GetBooking(string Initial)
        {
            string ProcName = "[exp].[prcGetBooking]";

            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);
            dquery.AddVarcharParam("@initial", 250, Initial);
            return(dquery.GetTables());
        }
Exemple #12
0
        public void DeleteGeneral(string formName, int pk_tableID)
        {
            string ProcName = "prcDeleteGeneral";

            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);
            dquery.AddIntegerParam("@pk_tableID", pk_tableID);
            dquery.AddVarcharParam("@formName", 20, formName);
            dquery.RunActionQuery();
        }
Exemple #13
0
        public DataSet GetNVOCCLine(int pk_NVOCCID, string NVOCCName)
        {
            string ProcName = "admin.prcGetNVOCCLine";
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);

            dquery.AddIntegerParam("@pk_NVOCCID", pk_NVOCCID);
            dquery.AddVarcharParam("@NVOCCName", 6, NVOCCName);

            return dquery.GetTables();
        }
Exemple #14
0
        public int AddEditLine(int userID, int pk_NVOCCId, string NVOCCName, int DefaultFreeDays, string ContAgentCode, decimal ImpCommsn, decimal ExpCommsn, char ExpBook, decimal rBuffer, string logoPath, bool isEdit)
        {
            string ProcName = "admin.prcAddEditLine";

            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);
            dquery.AddIntegerParam("@userID", userID);
            dquery.AddIntegerParam("@pk_NVOCCId", pk_NVOCCId);
            dquery.AddVarcharParam("@NVOCCName", 50, NVOCCName);
            dquery.AddIntegerParam("@DefaultFreeDays", DefaultFreeDays);
            dquery.AddVarcharParam("@ContAgentCode", 10, ContAgentCode);
            dquery.AddDecimalParam("@ImportCommission", 6, 2, ImpCommsn);
            dquery.AddDecimalParam("@ExportCommission", 6, 2, ExpCommsn);
            dquery.AddDecimalParam("@RBuffer", 6, 2, rBuffer);
            dquery.AddCharParam("@ExportBooking", 1, ExpBook);
            dquery.AddVarcharParam("@logoPath", 150, logoPath);
            dquery.AddBooleanParam("@isEdit", isEdit);

            return(dquery.RunActionQuery());
        }
Exemple #15
0
        public static DataSet GetTranshipmentList(SearchCriteria searchCriteria)
        {
            string ProcName = "[exp].[prcTranshipmentList]";

            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);

            //if(searchCriteria.tra != 0)
            //    dquery.AddIntegerParam("@pk_TranShipID", TranshipmentId);

            if (!string.IsNullOrEmpty(searchCriteria.ContainerNo))
            {
                dquery.AddVarcharParam("@SchContainerNo", 11, searchCriteria.ContainerNo);
            }

            if (!string.IsNullOrEmpty(searchCriteria.BookingNo))
            {
                dquery.AddVarcharParam("@SchBookingNo", 10, searchCriteria.BookingNo);
            }

            if (!string.IsNullOrEmpty(searchCriteria.BLNo))
            {
                dquery.AddVarcharParam("@SchEDGEBLNo", 30, searchCriteria.BLNo);
            }

            if (!string.IsNullOrEmpty(searchCriteria.StringOption1))
            {
                dquery.AddVarcharParam("@SchRefBookingNo", 30, searchCriteria.StringOption1);
            }

            dquery.AddVarcharParam("@SortExpression", 30, searchCriteria.SortExpression);
            dquery.AddVarcharParam("@SortDirection", 4, searchCriteria.SortDirection);

            return(dquery.GetTables());
        }
Exemple #16
0
        public int AddEditSlotOperator(int userID, int pk_SlotOperatorId, string SlotOperatorName, bool isEdit)
        {
            string ProcName = "exp.prcAddEditSlotOperator";
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);
            dquery.AddIntegerParam("@userID", userID);
            dquery.AddIntegerParam("@pk_SlotOperatorId", pk_SlotOperatorId);
            dquery.AddVarcharParam("@SlotOperatorName", 50, SlotOperatorName);
            dquery.AddIntegerParam("@fk_CompanyID", 1);
            dquery.AddBooleanParam("@isEdit", isEdit);

            return dquery.RunActionQuery();

        }
Exemple #17
0
        public DataSet GetVessel(int vesselId, int vesselPrefix, string vesselName, int vesselFlag)
        {
            string ProcName = "prcGetVessel";
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);

            dquery.AddIntegerParam("@pk_vesselId", vesselId);
            dquery.AddIntegerParam("@fk_VesselPrefixID", vesselPrefix);
            dquery.AddVarcharParam("@vesselName", 70, vesselName);
            dquery.AddIntegerParam("@vesselFlag", vesselFlag);


            return dquery.GetTables();
        }
Exemple #18
0
        public int AddEditPort(int userID, int pk_PortId, string PortName, string PortCode, bool ICDIndicator, string PortAddressee, string Address2, string Address3, string ExportPort, bool isEdit)
        {
            string ProcName = "admin.prcAddEditPort";

            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);
            dquery.AddIntegerParam("@userID", userID);
            dquery.AddIntegerParam("@pk_PortId", pk_PortId);
            dquery.AddVarcharParam("@PortName", 200, PortName);
            dquery.AddVarcharParam("@PortCode", 6, PortCode);
            dquery.AddBooleanParam("@ICDIndicator", ICDIndicator);
            dquery.AddVarcharParam("@PortAddressee", 50, PortAddressee);
            dquery.AddVarcharParam("@Address2", 50, Address2);
            dquery.AddVarcharParam("@Address3", 50, Address3);
            dquery.AddVarcharParam("@ExportPort", 3, ExportPort);
            dquery.AddBooleanParam("@isEdit", isEdit);

            return(dquery.RunActionQuery());
        }
Exemple #19
0
        public int AddEditVoyage(int userID, bool isEdit, EMS.Entity.VoyageEntity voyage)
        {
            string ProcName = "prcAddEditVoyage";

            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);
            dquery.AddIntegerParam("@userID", userID);
            dquery.AddBooleanParam("@isEdit", isEdit);

            dquery.AddIntegerParam("@pk_VoyageID", voyage.pk_VoyageID);
            dquery.AddIntegerParam("@fk_VesselID", voyage.fk_VesselID);
            dquery.AddIntegerParam("@fl_TerminalID", voyage.fl_TerminalID);
            dquery.AddVarcharParam("@VoyageNo", 10, voyage.VoyageNo);
            dquery.AddDecimalParam("@ImpXChangeRate", 6, 2, voyage.ImpXChangeRate);
            dquery.AddVarcharParam("@IGMNo", 10, voyage.IGMNo);
            //dquery.AddVarcharParam("@CallSign", 14, voyage.CallSign);
            dquery.AddDateTimeParam("@IGMDate", voyage.IGMDate);
            dquery.AddDateTimeParam("@LandingDate", voyage.LandingDate);
            dquery.AddDateTimeParam("@ETADate", voyage.ETADate);
            dquery.AddDateTimeParam("@AddLandingDate", voyage.AddLandingDate);
            dquery.AddDateTimeParam("@PCCDate", voyage.PCCDate);
            dquery.AddVarcharParam("@PCCNo", 14, voyage.PCCNo);
            dquery.AddVarcharParam("@VoyageType", 1, "I");
            dquery.AddIntegerParam("@fk_LPortID", voyage.fk_LPortID);
            dquery.AddIntegerParam("@fk_LPortID1", voyage.fk_LPortID1);
            dquery.AddIntegerParam("@fk_LPortID2", voyage.fk_LPortID2);
            dquery.AddVarcharParam("@LGNo", 40, voyage.LGNo);
            dquery.AddVarcharParam("@AltLGNo", 40, voyage.AltLGNo);
            dquery.AddVarcharParam("@VesselType", 1, voyage.VesselType);
            dquery.AddVarcharParam("@MotherDaughterDtl", 500, voyage.MotherDaughterDtl);
            dquery.AddVarcharParam("@TotalLines", 5, voyage.TotalLines);
            dquery.AddVarcharParam("@CargoDesc", 50, voyage.CargoDesc);
            dquery.AddVarcharParam("@VIANo", 10, voyage.VIANo);
            dquery.AddVarcharParam("@VCN", 14, voyage.VCN);
            dquery.AddVarcharParam("@ETATime", 7, voyage.ETATime);
            dquery.AddIntegerParam("@LightHouseDue", voyage.LightHouseDue);
            dquery.AddBooleanParam("@SameButtonCargo", voyage.SameButtonCargo == "1" ? true : false);
            dquery.AddBooleanParam("@ShipStoreSubmitted", voyage.ShipStoreSubmitted == "1" ? true : false);
            dquery.AddBooleanParam("@CrewList", voyage.CrewList == "1" ? true : false);
            dquery.AddBooleanParam("@PassengerList", voyage.PassengerList == "1" ? true : false);
            dquery.AddBooleanParam("@CrewEffectList", voyage.CrewEffectList == "1" ? true : false);
            dquery.AddBooleanParam("@MaritimeList", voyage.MaritimeList == "1" ? true : false);
            dquery.AddIntegerParam("@LocId", voyage.locid);
            dquery.AddIntegerParam("@fk_pod", voyage.fk_Pod);
            return(dquery.RunActionQuery());
        }