Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (GetSessionUserID() == 0)
        {
            Response.Redirect("~/account/login.aspx");
        }
        if (!IsPostBack)
        {
            ucAsyncPager1.BindMethodName = "BindNextPageJobs";
            ucAsyncPager2.BindMethodName = "BindNextPageItems";
            //  ucAsyncLocPager.BindMethodName = "onGetLocation";
            // UserAccessValidation();
            BLL_Infra_VesselLib objBLLVessel = new BLL_Infra_VesselLib();
            DataTable           dtvsl        = objBLLVessel.Get_VesselList(0, 0, UDFLib.ConvertToInteger(Session["USERCOMPANYID"]), "", UDFLib.ConvertToInteger(Session["USERCOMPANYID"]));
            DDlVessel_List.DataSource = dtvsl;
            DDlVessel_List.DataBind();
            DDlVessel_List.Items.Insert(0, new ListItem("--SELECT VESSEL--", "0"));

            // BindLocationGrid();
            hdnUserID.Value    = Session["userid"].ToString();
            hdnCompanyID.Value = Session["USERCOMPANYID"].ToString();
            hdnAppName.Value   = System.Configuration.ConfigurationManager.AppSettings["APP_NAME"].ToString();
            BindDeptOptList();
            Session["Image"]                        = "";
            Session["DetailsImage"]                 = "";
            Session["ItemOperationMode"]            = "";
            Session["AppAttach_" + hdnItemID.Value] = "";
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        UserAccessValidation();
        lblMessageOnSendApproval.Text    = "";
        lblMessageOnSendApproval.Visible = false;
        //UserAccessValidation();
        try
        {
            hdf_UserID.Value = Session["userid"].ToString();
            if (!IsPostBack)
            {
                ListItem li = cmbFleet.Items.FindByValue(Convert.ToString(Session["USERFLEETID"]));
                if (li != null)
                {
                    li.Selected = true;
                }

                BLL_Infra_VesselLib objBLLVessel = new BLL_Infra_VesselLib();
                DataTable           dtvsl        = objBLLVessel.Get_VesselList(int.Parse(cmbFleet.SelectedValue), 0, UDFLib.ConvertToInteger(Session["USERCOMPANYID"]), "", UDFLib.ConvertToInteger(Session["USERCOMPANYID"]));
                DDlVessel_List.DataSource = dtvsl;
                DDlVessel_List.DataBind();
                DDlVessel_List.Items.Insert(0, new ListItem("--VESSELS--", "0"));

                ViewState["Status"] = "NEW";
                BindRequestList();

                txtSelMenu.Value = lnkMenu1.ClientID;

                ScriptManager.RegisterStartupScript(Page, Page.GetType(), "selectNode", "selMe('" + txtSelMenu.Value + "');", true);

                BLL_Infra_UserCredentials objUser = new BLL_Infra_UserCredentials();
                chklistUser.DataSource     = objUser.Get_UserList(1);
                chklistUser.DataTextField  = "USERNAME";
                chklistUser.DataValueField = "USERID";
                chklistUser.DataBind();
            }
            chkShowAllPendingApproval.Visible = false;

            string js = "bindClientEvents();";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "bindEvents", js, true);

            string js1 = "bindPaxsName();";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "bindPaxsName", js1, true);


            string js2 = "bindRoutInfo();";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "bindRoutInfo", js2, true);

            string js3 = "bindVesselPortCall();";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "bindVesselPortCall", js3, true);

            string js4 = "bindselectors();";
            ScriptManager.RegisterStartupScript(this, this.GetType(), "bindselectors", js4, true);
        }
        catch { throw; }
    }
Exemple #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         ucAsyncPager2.BindMethodName = "BindNextPageItems";
         // UserAccessValidation();
         BLL_Infra_VesselLib objBLLVessel = new BLL_Infra_VesselLib();
         DataTable           dtvsl        = objBLLVessel.Get_VesselList(0, 0, UDFLib.ConvertToInteger(Session["USERCOMPANYID"]), "", UDFLib.ConvertToInteger(Session["USERCOMPANYID"]));
         DDlVessel_List.DataSource = dtvsl;
         DDlVessel_List.DataBind();
         DDlVessel_List.Items.Insert(0, new ListItem("--SELECT VESSEL--", "0"));
     }
 }