Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //_userId = EMS.BLL.UserBLL.GetLoggedInUserId();


            if (!IsPostBack)
            {
                FreeLinkID = GeneralFunctions.DecryptQueryString(Request.QueryString["id"]);
                ClearText();
                GeneralFunctions.PopulateDropDownList(ddlLoc, dbinteract.PopulateDDLDS("DSR.dbo.mstLocation", "pk_LocID", "LocName", true), true);
                GeneralFunctions.PopulateDropDownList(ddlLine, dbinteract.PopulateDDLDS("DSR.dbo.MSTPROSPECTFOR", "pk_prospectid", "ProspectName", true), true);
                btnBack.OnClientClick = "javascript:return RedirectAfterCancelClick('ManageFreeDays.aspx','" + ResourceManager.GetStringWithoutName("ERR00017") + "')";
                if (FreeLinkID == "-1")
                {
                    //txtFreeDays.Visible = false;
                    //ddlStatus.Enabled = false;
                }
                else
                {
                    //DatePicker1.Visible = false;
                    LoadData(FreeLinkID);
                }
            }
            RetriveParameters();
            CheckUserAccess(FreeLinkID);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            _userId = EMS.BLL.UserBLL.GetLoggedInUserId();
            RetriveParameters();
            VoyageId = GeneralFunctions.DecryptQueryString(Request.QueryString["id"]);

            if (!IsPostBack)
            {
                GeneralFunctions.PopulateDropDownList(ddlLoc, dbinteract.PopulateDDLDS("DSR.dbo.mstLocation", "pk_LocID", "LocName", true), true);
                GeneralFunctions.PopulateDropDownList(ddlVessel, dbinteract.PopulateDDLDS("trnVessel", "pk_VesselID", "VesselName"));
                btnBack.OnClientClick = "javascript:return RedirectAfterCancelClick('MangeVoyage.aspx?p=" + Request.QueryString["p"] + "','" + ResourceManager.GetStringWithoutName("ERR00017") + "')";
                if (VoyageId != "-1")
                {
                    //btnSave.OnClientClick = "javascript:return confirm('All Containers of the voyage will be deleted. Confirm with Yes');";
                    btnSave.OnClientClick = "javascript:return CheckForDeletion();";
                    LoadData(VoyageId);

                    if (_PrevPage == "import")
                    {
                        DisableFields();
                    }
                }
                else
                {
                    LandingDateCheck(dbinteract, VoyageId);
                }
            }
            else
            {
                LandingDateCheck(dbinteract, VoyageId);
            }
            CheckUserAccess(VoyageId);
        }
Beispiel #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     BLL.DBInteraction dbinteract = new BLL.DBInteraction();
     if (!IsPostBack)
     {
         GeneralFunctions.PopulateDropDownList(ddlLine, EMS.BLL.EquipmentBLL.DDLGetLine());
         GeneralFunctions.PopulateDropDownList(ddlVessel, dbinteract.PopulateDDLDS("trnVessel", "pk_VesselID", "VesselName"), true);
         GeneralFunctions.PopulateDropDownList(ddlLoc, dbinteract.PopulateDDLDS("DSR.dbo.mstLocation", "pk_LocID", "LocName", true), true);
         GenerateReport();
     }
 }
Beispiel #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //_userId = EMS.BLL.UserBLL.GetLoggedInUserId();


            if (!IsPostBack)
            {
                VesselId = GeneralFunctions.DecryptQueryString(Request.QueryString["id"]);
                ClearText();
                BLL.DBInteraction dbinteract = new BLL.DBInteraction();
                GeneralFunctions.PopulateDropDownList(ddlVesselPrefix, dbinteract.PopulateDDLDS("mstVesselPrefix", "pk_VesselPrefixID", "VesselPrefix"));
                btnBack.OnClientClick = "javascript:return RedirectAfterCancelClick('ManageVessel.aspx','" + ResourceManager.GetStringWithoutName("ERR00017") + "')";

                if (VesselId != "-1")
                {
                    LoadData(VesselId);
                }
                else
                {
                    LoadShip_Tax(_userId, dbinteract);
                }
            }
            RetriveParameters();
            CheckUserAccess(VesselId);
        }
Beispiel #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RetriveParameters();
            //_userId = EMS.BLL.UserBLL.GetLoggedInUserId();

            EqEstId = GeneralFunctions.DecryptQueryString(Request.QueryString["id"]);

            if (!IsPostBack)
            {
                GeneralFunctions.PopulateDropDownList(ddlLoc, dbinteract.PopulateDDLDS("DSR.dbo.mstLocation", "pk_LocID", "LocName", true), true);
                GeneralFunctions.PopulateDropDownList(ddlLine, EMS.BLL.EquipmentBLL.DDLGetLine());



                btnBack.OnClientClick = "javascript:return RedirectAfterCancelClick('RepairingEstimate.aspx','" + EMS.Utilities.ResourceManager.ResourceManager.GetStringWithoutName("ERR00017") + "')";
                if (EqEstId != "-1")
                {
                    // GeneralFunctions.PopulateDropDownList(ddlUser, EMS.BLL.UserBLL.GetAdminUsers(_userId, Convert.ToInt32(ddlLoc.SelectedValue)));

                    LoadData(_userId, EqEstId);
                }

                int dis = DisableControls();
            }
            if (EqEstId == "-1")
            {
                txtReleasedOn.Enabled   = false;
                txtStockRetDate.Enabled = false;
            }
            CheckUserAccess(EqEstId);
        }
Beispiel #6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     RetriveParameters();
     BLL.DBInteraction dbinteract = new BLL.DBInteraction();
     if (!IsPostBack)
     {
         GeneralFunctions.PopulateDropDownList(ddlLine, EMS.BLL.EquipmentBLL.DDLGetLine());
         GeneralFunctions.PopulateDropDownList(ddlVessel, dbinteract.PopulateDDLDS("trnVessel", "pk_VesselID", "VesselName"), true);
         GeneralFunctions.PopulateDropDownList(ddlLoc, dbinteract.PopulateDDLDS("DSR.dbo.mstLocation", "pk_LocID", "LocName", true), true);
         if (_LocationSpecific)
         {
             ddlLoc.SelectedValue = Convert.ToString(_userLocation);
             ddlLoc.Enabled       = false;
         }
         // GenerateReport();
     }
 }
        private void LoadLocationDDL()
        {
            GeneralFunctions.PopulateDropDownList(ddlLocation, dbinteract.PopulateDDLDS("DSR.dbo.mstLocation", "pk_LocID", "LocName", true), false);
            //GeneralFunctions.PopulateDropDownList(ddlTerminalID, dbinteract.PopulateDDLDS("dsr.dbo.mstLocation", "pk_LocationID", "LocationName", ""));
            //DataTable dt = new expVoyageBLL().Getlocation(); // Convert.ToInt64(ddlLocation.SelectedValue));

            //if (dt != null && dt.Rows.Count > 0)
            //{
            //    DataRow dr = dt.NewRow();
            //    dr["pk_LocationID"] = "0";
            //    dr["LocationName"] = "--Select--";
            //    dt.Rows.InsertAt(dr, 0);
            //    ddlLocation.DataValueField = "pk_LocationID";
            //    ddlLocation.DataTextField = "LocationName";
            //    ddlLocation.DataSource = dt;
            //    ddlLocation.DataBind();
            //}
        }
        protected void ddlLocation_SelectedIndexChanged(object sender, EventArgs e)
        {
            ListItem Li = null;

            ddlEmptyYard.Items.Clear();
            BLL.DBInteraction dbinteract = new BLL.DBInteraction();
            GeneralFunctions.PopulateDropDownList(ddlEmptyYard, dbinteract.PopulateDDLDS("dbo.mstAddress", "fk_AddressID", "AddrName", "Where (AddrActive=1 and AddrType='3' and fk_LocationID=" + ddlLocation.SelectedValue, true));

            //Li = new ListItem("SELECT", "0");
            //ddlBookingParty.Items.Insert(0, Li);
        }
        private void LoadData(string VoyageId)
        {
            int intVoyageId = 0;

            if (VoyageId == "" || !Int32.TryParse(VoyageId, out intVoyageId))
            {
                return;
            }
            BLL.DBInteraction   dbinteract = new BLL.DBInteraction();
            System.Data.DataSet ds         = dbinteract.GetVoyage(Convert.ToInt32(VoyageId), "a", "", "", "", 0);

            if (!ReferenceEquals(ds, null) && ds.Tables[0].Rows.Count > 0)
            {
                ddlLoc.SelectedValue = ds.Tables[0].Rows[0]["pk_LocID"].ToString();

                GeneralFunctions.PopulateDropDownList(ddlTerminalID, dbinteract.PopulateDDLDS("mstTerminal", "pk_TerminalID", "TerminalName] + '-' + [terminal", "Where fk_LocationID=" + ddlLoc.SelectedValue));
                ddlTerminalID.SelectedValue = ds.Tables[0].Rows[0]["fl_TerminalID"].ToString();
                txtAltLGNo.Text             = ds.Tables[0].Rows[0]["AltLGNo"].ToString();
                txtCargoDesc.Text           = ds.Tables[0].Rows[0]["CargoDesc"].ToString();
                txtExcRate.Text             = ds.Tables[0].Rows[0]["ImpXChangeRate"].ToString();
                txtIGMNo.Text = ds.Tables[0].Rows[0]["IGMNo"].ToString();
                //txtCallSign.Text = ds.Tables[0].Rows[0]["CallSign"].ToString();
                txtLGNo.Text                        = ds.Tables[0].Rows[0]["LGNo"].ToString();
                txtLightHouse.Text                  = ds.Tables[0].Rows[0]["LightHouseDue"].ToString();
                txtMotherDaughter.Text              = ds.Tables[0].Rows[0]["MotherDaughterDtl"].ToString();
                txtPCCNo.Text                       = ds.Tables[0].Rows[0]["PCCNo"].ToString();
                txtTime.Text                        = ds.Tables[0].Rows[0]["ETATime"].ToString();
                txtTotLine.Text                     = ds.Tables[0].Rows[0]["TotalLines"].ToString();
                txtVCN.Text                         = ds.Tables[0].Rows[0]["VCN"].ToString();
                ddlVessel.SelectedValue             = ds.Tables[0].Rows[0]["fk_VesselID"].ToString();
                txtVIA.Text                         = ds.Tables[0].Rows[0]["VIANo"].ToString();
                txtVoyageNo.Text                    = ds.Tables[0].Rows[0]["VoyageNo"].ToString();
                ddlCrewEffList.SelectedValue        = ds.Tables[0].Rows[0]["CrewEffectList"].ToString();
                ddlCrewList.SelectedValue           = ds.Tables[0].Rows[0]["CrewList"].ToString();
                ddlMaritime.SelectedValue           = ds.Tables[0].Rows[0]["MaritimeList"].ToString();
                ddlPessengerList.SelectedValue      = ds.Tables[0].Rows[0]["PassengerList"].ToString();
                ddlSameButton.SelectedValue         = ds.Tables[0].Rows[0]["SameButtonCargo"].ToString();
                ddlShipStoreSubmitted.SelectedValue = ds.Tables[0].Rows[0]["ShipStoreSubmitted"].ToString();
                ddlTerminalID.SelectedValue         = ds.Tables[0].Rows[0]["fl_TerminalID"].ToString();

                txtdtETA.Text         = ds.Tables[0].Rows[0]["ETADate"].ToString().Split(' ')[0];
                txtdtLand.Text        = ds.Tables[0].Rows[0]["AddLandingDate"].ToString().Split(' ')[0];
                txtDtIGM.Text         = ds.Tables[0].Rows[0]["IGMDate"].ToString().Split(' ')[0];
                txtdtLand.Text        = ds.Tables[0].Rows[0]["LandingDate"].ToString().Split(' ')[0];
                hdnLandingDT.Value    = ds.Tables[0].Rows[0]["LandingDate"].ToString().Split(' ')[0]; //Rajen
                hdnOldLandingDT.Value = ds.Tables[0].Rows[0]["LandingDate"].ToString().Split(' ')[0];
                txtdtPCC.Text         = ds.Tables[0].Rows[0]["PCCDate"].ToString().Split(' ')[0];
                //txtdtAddLand.Text = ds.Tables[0].Rows[0]["__"].ToString();
                ((TextBox)AutoCompletepPort1.FindControl("txtPort")).Text = ds.Tables[0].Rows[0]["lastport"].ToString();
                ((TextBox)AutoCompletepPort2.FindControl("txtPort")).Text = ds.Tables[0].Rows[0]["lastport1"].ToString();
                ((TextBox)AutoCompletepPort3.FindControl("txtPort")).Text = ds.Tables[0].Rows[0]["lastport2"].ToString();
                ((TextBox)AutoCompletepPort4.FindControl("txtPort")).Text = ds.Tables[0].Rows[0]["portDischarge"].ToString();
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     RetriveParameters();
     CheckUserAccess();
     BLL.DBInteraction dbinteract = new BLL.DBInteraction();
     if (!IsPostBack)
     {
         GeneralFunctions.PopulateDropDownList(ddlLine, EMS.BLL.EquipmentBLL.DDLGetLine());
         GeneralFunctions.PopulateDropDownList(ddlLoc, dbinteract.PopulateDDLDS("DSR.dbo.mstLocation", "pk_LocID", "LocAbbr", true), true);
         //GeneralFunctions.PopulateDropDownList(ddlStatus, EMS.BLL.EquipmentBLL.DDLGetStatus());
         //GeneralFunctions.PopulateDropDownList(ddlContainerType, EMS.BLL.EquipmentBLL.DDLGetContainerType());
         ddlEmptyYard.Enabled = false;
     }
 }
        void fillAllDropdown()
        {
            ListItem Li = null;

            BLL.DBInteraction dbinteract = new BLL.DBInteraction();

            #region Location
            //
            PopulateDropDown((int)Enums.DropDownPopulationFor.Location, ddlLocation, 0);
            Li = new ListItem("SELECT", "0");
            ddlLocation.Items.Insert(0, Li);
            //Li = new ListItem("ALL", "-1");
            //ddlLocation.Items.Insert(1, Li);
            #endregion

            #region Line

            PopulateDropDown((int)Enums.DropDownPopulationFor.Line, ddlNvocc, 0);
            Li = new ListItem("SELECT", "0");
            ddlNvocc.Items.Insert(0, Li);

            #endregion

            #region Party Master

            ////Li = new ListItem("ALL", "-1");
            ////GeneralFunctions.PopulateDropDownList(ddlBookingParty, dbinteract.PopulateDDLDS("DSR.dbo.mstCustomer", "pk_CustID", "CustName", true), false);
            //GeneralFunctions.PopulateDropDownList(ddlBookingParty, dbinteract.PopulateDDLDS("dsr.dbo.mstCustomer", "pk_CustID", "CustName", "Where Active='Y' and (CorporateorLocal='C' OR fk_LocID=" + ddlLocation.SelectedValue, true), false);
            ////PopulateDropDown((int)Enums.DropDownPopulationFor.ExpBookingParty, ddlBookingParty, 0);
            ////ddlBookingParty.Items.Insert(0, Li);

            #endregion


            #region ContainerType

            //GridViewRow cntrtypes = gvContainer.HeaderRow;

            ////GridViewRow item = (GridViewRow)((DropDownList)sender).NamingContainer;

            //DropDownList ddlCntrType = (DropDownList)cntrtypes.FindControl("ddlCntrType");
            GeneralFunctions.PopulateDropDownList(ddlCntrType, dbinteract.PopulateDDLDS("mstContainerType", "pk_ContainerTypeID", "ContainerAbbr"));
            ////Li = new ListItem("ALL", "-1");
            ////PopulateDropDown((int)Enums.DropDownPopulationFor.Services, ddlService, 0);
            ////ddlService.Items.Insert(0, Li);
            #endregion
        }
Beispiel #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _userId = EMS.BLL.UserBLL.GetLoggedInUserId();

            VoyageId = GeneralFunctions.DecryptQueryString(Request.QueryString["id"]);

            if (!IsPostBack)
            {
                GeneralFunctions.PopulateDropDownList(ddlVessel, dbinteract.PopulateDDLDS("trnVessel", "pk_VesselID", "VesselName"));
                btnBack.OnClientClick = "javascript:return RedirectAfterCancelClick('MainLineVoyage.aspx','" + ResourceManager.GetStringWithoutName("ERR00017") + "')";
                if (VoyageId != "-1")
                {
                    LoadData(VoyageId);
                }
            }

            //
        }