Пример #1
0
        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();

        }
Пример #2
0
        public int AddEditSTax(int userID, int pk_StaxID, DateTime?StartDate, decimal TaxAddCess, decimal TaxCess, decimal TaxPer, bool TaxStatus, bool isEdit)
        {
            string ProcName = "admin.prcAddEditSTax";

            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);
            dquery.AddIntegerParam("@userID", userID);
            dquery.AddIntegerParam("@pk_StaxID", pk_StaxID);
            dquery.AddDateTimeParam("@StartDate", StartDate);
            dquery.AddDecimalParam("@TaxAddCess", 6, 2, TaxAddCess);
            dquery.AddDecimalParam("@TaxCess", 6, 2, TaxCess);
            dquery.AddDecimalParam("@TaxPer", 6, 2, TaxPer);
            dquery.AddBooleanParam("@TaxStatus", TaxStatus);
            dquery.AddBooleanParam("@isEdit", isEdit);

            return(dquery.RunActionQuery());
        }
Пример #3
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());
        }
Пример #4
0
        public static DateTime TranshipmentStatus(int ExpBLId, ref bool VoyageStatus, ref int CountID)
        {
            DateTime Result;
            string   TempString;
            bool     ClsVoyage = false;
            int      Count     = 0;
            string   ProcName  = "[exp].[prcTranshipmentStatus]";

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

            dquery.AddIntegerParam("@ExpBLId", ExpBLId);
            dquery.AddDateTimeParam("@RESULT", null, QueryParameterDirection.Output);
            dquery.AddBooleanParam("@closeVoyage", ClsVoyage, QueryParameterDirection.Output);
            dquery.AddIntegerParam("@CountID", Count, QueryParameterDirection.Output);

            dquery.RunActionQuery();
            TempString = Convert.ToString(dquery.GetParaValue("@Result"));
            if (TempString == null || TempString == "")
            {
                Result = default(DateTime);
            }
            else
            {
                Result = Convert.ToDateTime(dquery.GetParaValue("@Result"));
            }
            //Result = Convert.ToDateTime(dquery.GetParaValue("@SailDate"));
            VoyageStatus = Convert.ToBoolean(dquery.GetParaValue("@CloseVoyage"));
            CountID      = Convert.ToInt32(dquery.GetParaValue("@CountID"));
            return(Result);
        }
Пример #5
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());
        }
Пример #6
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();

        }
Пример #7
0
        public int AddEditFreeDays(int userID, int pk_LinkID, int DefaultFreeDays, int Location, int NVOCC, bool isEdit)
        {
            string ProcName = "[admin].[prcAddEditFreeDays]";
            DAL.DbManager.DbQuery dquery = new DAL.DbManager.DbQuery(ProcName);
            dquery.AddIntegerParam("@userID", userID);
            dquery.AddIntegerParam("@pk_LinkID", pk_LinkID);
            dquery.AddIntegerParam("@fk_LocationID", Location);
            dquery.AddIntegerParam("@fk_NVOCCID", NVOCC);
            dquery.AddIntegerParam("@DefaultFreeDays", DefaultFreeDays);
            dquery.AddBooleanParam("@isEdit", isEdit);

            return dquery.RunActionQuery();

        }
Пример #8
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());
        }
Пример #9
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());
        }
Пример #10
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());
        }