public void BindUser()
    {
        DataTable ds = objUser.Get_UserList();

        ds.DefaultView.RowFilter = "User_Type='OFFICE USER' and Active_Status=1";
        DataTable dt = ds.DefaultView.ToTable();

        grdUser.DataSource = dt;
        grdUser.DataBind();
    }
Esempio n. 2
0
    protected void Load_ManagerList_Filter()
    {
        int       iCompID  = UDFLib.ConvertToInteger(ddlCompanyFilter.SelectedValue);
        DataTable dtfilter = objUserBLL.Get_UserList(iCompID);

        ddlManagerFilter.Items.Clear();
        ddlManagerFilter.DataSource     = dtfilter;
        ddlManagerFilter.DataTextField  = "UserName";
        ddlManagerFilter.DataValueField = "UserID";
        ddlManagerFilter.DataBind();
        ddlManagerFilter.Items.Insert(0, new ListItem("-SELECT ALL-", "0"));
    }
Esempio n. 3
0
    public string GetUserList(int CompanyID, string FilterText, int UserID)
    {
        try
        {
            return(UDFLib.CreateHtmlTableFromDataTable(objBllUser.Get_UserList(CompanyID, FilterText, UserID),
                                                       new string[] { "", "" },
                                                       new string[] { "UserName", "UserID" }, ""));
        }

        catch
        {
            throw;
        }
    }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CalendarExtendertxtDueDate.Format = Convert.ToString(Session["User_DateFormat"]);

        TodayDateFormat = UDFLib.DateFormatMessage();
        if (Session["USERFULLNAME"] == null)
        {
            Response.Redirect("~/Account/Login.aspx");
        }

        if (!IsPostBack)
        {
            DataTable dt = objUser.Get_UserList(Convert.ToInt32(Session["USERCOMPANYID"]));

            ddlFeedbackFrom.DataSource     = dt;
            ddlFeedbackFrom.DataTextField  = "USERNAME";
            ddlFeedbackFrom.DataValueField = "UserID";
            ddlFeedbackFrom.DataBind();
            ddlFeedbackFrom.Items.Insert(0, new ListItem("-Select-", "0"));


            DataTable dt1 = BLL_Crew_Evaluation.Get_FeedbackCategories();

            ddlFeedbackCategory_Add.DataSource     = dt1;
            ddlFeedbackCategory_Add.DataTextField  = "CATEGORY";
            ddlFeedbackCategory_Add.DataValueField = "ID";
            ddlFeedbackCategory_Add.DataBind();

            lblName.Text = Session["USERFULLNAME"].ToString();
            lblDate.Text = DateTime.Now.ToString(Convert.ToString(Session["User_DateFormat"]));

            Load_CrewEvaluationFeedbackRequest();
        }
    }
Esempio n. 5
0
    protected void Load_UserList()
    {
        int CompanyID = UDFLib.ConvertToInteger(lstCompany.SelectedValue);

        if (CompanyID == 0)
        {
            if (Session["USERCOMPANYID"] != null)
            {
                CompanyID = int.Parse(Session["USERCOMPANYID"].ToString());
            }
            // CompanyID = 1;
        }

        DataTable dt = objBllUser.Get_UserList(CompanyID, "");

        ddlCopyFromUser.DataSource = dt;
        ddlCopyFromUser.DataBind();
    }
Esempio n. 6
0
    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; }
    }
Esempio n. 7
0
    protected void BindUserList()
    {
        BLL_Infra_UserCredentials objInfra = new BLL_Infra_UserCredentials();
        int       UserCompanyID            = int.Parse(Session["USERCOMPANYID"].ToString());
        DataTable dtUsers = objInfra.Get_UserList(UserCompanyID);

        lstUser.DataSource = dtUsers;
        lstUser.DataBind();
        lstUser.Items.Insert(0, new ListItem("- ALL -", "0"));
    }
Esempio n. 8
0
    protected void Load_UserList()
    {
        BLL_Infra_UserCredentials objInfra = new BLL_Infra_UserCredentials();

        int       UserCompanyID = int.Parse(getSessionString("USERCOMPANYID"));
        DataTable dtUsers       = objInfra.Get_UserList(UserCompanyID);

        GridView_UserList.DataSource = dtUsers;
        GridView_UserList.DataBind();
        //lstUser.Items.Insert(0, new ListItem("-SELECT ALL -", "0"));
    }
    protected void InitialUserBind()
    {
        BLL_Infra_UserCredentials objUserBLL = new BLL_Infra_UserCredentials();
        int       UserCompanyID = UDFLib.ConvertToInteger(Session["USERCOMPANYID"].ToString());
        DataTable dt            = objUserBLL.Get_UserList(UserCompanyID, "");

        ddlUser.DataSource     = dt;
        ddlUser.DataTextField  = "USER_NAME";
        ddlUser.DataValueField = "USERID";
        ddlUser.DataBind();
        ddlUser.Items.Insert(0, new ListItem("-Select-", "0"));
    }
Esempio n. 10
0
    public void BindUserList()
    {
        DataTable dt     = objUser.Get_UserList();
        string    filter = "User_type ='OFFICE USER' ";


        dt.DefaultView.RowFilter = filter;

        DDLCommentedBy.DataSource     = dt.DefaultView.ToTable();
        DDLCommentedBy.DataTextField  = "UserName";
        DDLCommentedBy.DataValueField = "UserID";
        DDLCommentedBy.DataBind();
    }
Esempio n. 11
0
    protected void BindPIC()
    {
        try
        {
            int iCompID = int.Parse(Session["USERCOMPANYID"].ToString());

            ddlPIC.DataSource     = objBLLUser.Get_UserList(iCompID);
            ddlPIC.DataTextField  = "UserName";
            ddlPIC.DataValueField = "UserID";
            ddlPIC.DataBind();
            ddlPIC.Items.Insert(0, new ListItem("-SELECT ALL-", "0"));

            ddlInspector.DataSource     = objBLLUser.Get_UserList(iCompID);
            ddlInspector.DataTextField  = "UserName";
            ddlInspector.DataValueField = "UserID";
            ddlInspector.DataBind();
            ddlInspector.Items.Insert(0, new ListItem("-SELECT ALL-", "0"));
        }
        catch (Exception)
        {
            ////.WriteError(this.GetType().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex);
        }
    }
Esempio n. 12
0
    /// <summary>
    /// Bind The User CheckList
    /// </summary>
    protected void Load_UserList()                                                                                  // Bind User CheckList
    {
        int CompanyID = 0;

        if (UDFLib.ConvertIntegerToNull(Session["USERCOMPANYID"]) != null)
        {
            CompanyID = UDFLib.ConvertToInteger(Session["USERCOMPANYID"]);
        }
        BLL_Infra_UserCredentials objBllUser = new BLL_Infra_UserCredentials();
        DataTable dt = objBllUser.Get_UserList(CompanyID, "");

        chklstUser.DataSource = dt;
        chklstUser.DataBind();
        chklstUser.Items.Insert(0, new ListItem("- ALL -", "0"));
    }
Esempio n. 13
0
    protected void Load_UserList()
    {
        DataTable dt     = objBLLUser.Get_UserList();
        string    filter = "User_type ='OFFICE USER' or User_type like '%admin%' ";


        dt.DefaultView.RowFilter = filter;



        ddlUserName.DataSource     = dt.DefaultView;
        ddlUserName.DataTextField  = "USERNAME";
        ddlUserName.DataValueField = "USERID";
        ddlUserName.DataBind();
    }
Esempio n. 14
0
    public void BindEvaluationLocation(int EvaluationID)
    {
        DataTable dt = BLL_Crew_Evaluation.Get_EvaluationLocation(EvaluationID);


        if (dt.Rows.Count > 0)
        {
            BLL_Infra_UserCredentials objUCred = new BLL_Infra_UserCredentials();
            DataTable dtUser = objUCred.Get_UserList(Convert.ToInt32(Session["USERCOMPANYID"]));
            dtUser = dtUser.Select("User_Type='OFFICE USER'").CopyToDataTable();
            ddlEvaluator.DataSource     = dtUser;
            ddlEvaluator.DataTextField  = "USERNAME";
            ddlEvaluator.DataValueField = "USERID";
            ddlEvaluator.DataBind();

            ListItem lst = new ListItem();
            lst.Text  = "--SELECT--";
            lst.Value = "-1";
            ddlEvaluator.Items.Insert(0, lst);
            ddlEvaluator.Visible = true;
            txtNotify.Visible    = true;
            txtNotify.Text       = "";
            lblEvaluator.Visible = true;
            lblNotify.Visible    = true;
            lblDays.Visible      = true;
            lblnman.Visible      = true;
            lbleman.Visible      = true;

            chkOffice.Checked          = true;
            ddlEvaluator.SelectedValue = dt.Rows[0]["EvaluatorID"].ToString();
            txtNotify.Text             = dt.Rows[0][1].ToString();
        }

        else
        {
            chkOffice.Checked    = false;
            ddlEvaluator.Visible = false;
            txtNotify.Visible    = false;
            txtNotify.Text       = "";
            lblEvaluator.Visible = false;
            lblNotify.Visible    = false;
            lblDays.Visible      = false;
            lblnman.Visible      = false;
            lbleman.Visible      = false;
        }
    }
    public void BindUserList()
    {
        DataTable dt     = objUser.Get_UserList();
        string    filter = "User_type ='OFFICE USER' ";

        if (txtUserListSearch.Text.Trim() != "")
        {
            filter += "and  UserName like '%" + txtUserListSearch.Text + "%'";
        }

        dt.DefaultView.RowFilter = filter;

        chkLstUser.DataSource     = dt.DefaultView;
        chkLstUser.DataTextField  = "UserName";
        chkLstUser.DataValueField = "UserID";
        chkLstUser.DataBind();

        MarknEnabelCheckBox();
    }
Esempio n. 16
0
    //Method used to bind all Users to the drop down list.
    public void BindUsers()
    {
        BLL_Infra_UserCredentials objUserBLL = new BLL_Infra_UserCredentials();
        int       iCompID  = UDFLib.ConvertToInteger(ddlUser.SelectedValue);
        DataTable dtfilter = objUserBLL.Get_UserList(iCompID);

        if (dtfilter != null)
        {
            if (dtfilter.Rows.Count > 0)
            {
                ddlUser.Items.Clear();
                ddlUser.DataSource     = dtfilter;
                ddlUser.DataTextField  = "UserName";
                ddlUser.DataValueField = "UserID";
                ddlUser.DataBind();
            }
        }
        ddlUser.Items.Insert(0, new ListItem("-SELECT-", "0"));
    }
Esempio n. 17
0
    protected void lstDept_SelectedIndexChanged(object sender, EventArgs e)
    {
        string strDept = "";
        BLL_Infra_UserCredentials objInfra = new BLL_Infra_UserCredentials();

        if (lstDept.Items[0].Selected == true)
        {
            int       UserCompanyID = int.Parse(Session["USERCOMPANYID"].ToString());
            DataTable dtUsers       = objInfra.Get_UserList(UserCompanyID);
            lstUser.DataSource = dtUsers;
            lstUser.DataBind();
            lstUser.Items.Insert(0, new ListItem("- ALL -", "0"));
        }
        else
        {
            foreach (ListItem li in lstDept.Items)
            {
                if (li.Selected == true)
                {
                    if (strDept.Length > 0)
                    {
                        strDept += ",";
                    }
                    strDept += li.Value;
                }
            }

            if (strDept.Length > 0)
            {
                int       UserCompanyID = int.Parse(Session["USERCOMPANYID"].ToString());
                DataTable dtUsers       = objInfra.Get_UserList_By_Dept_DL(UserCompanyID, strDept);
                lstUser.DataSource = dtUsers;
                lstUser.DataBind();
                lstUser.Items.Insert(0, new ListItem("- ALL -", "0"));
            }
        }
        BindPublishDoc();
    }
Esempio n. 18
0
    protected void chkOffice_CheckedChanged(object sender, EventArgs e)
    {
        if (chkOffice.Checked == true)
        {
            lblEvaluator.Visible = true;
            lblNotify.Visible    = true;
            ddlEvaluator.Visible = true;
            txtNotify.Visible    = true;
            lblDays.Visible      = true;
            lblnman.Visible      = true;
            lbleman.Visible      = true;
            BLL_Infra_UserCredentials objUCred = new BLL_Infra_UserCredentials();
            DataTable dtUser = objUCred.Get_UserList(Convert.ToInt32(Session["USERCOMPANYID"]));
            dtUser = dtUser.Select("User_Type='OFFICE USER'").CopyToDataTable();
            ddlEvaluator.DataSource     = dtUser;
            ddlEvaluator.DataTextField  = "USERNAME";
            ddlEvaluator.DataValueField = "USERID";
            ddlEvaluator.DataBind();

            ListItem lst = new ListItem();
            lst.Text  = "--SELECT--";
            lst.Value = "-1";
            ddlEvaluator.Items.Insert(0, lst);
        }

        else
        {
            lblEvaluator.Visible = false;
            lblNotify.Visible    = false;
            ddlEvaluator.Visible = false;
            txtNotify.Visible    = false;
            lblDays.Visible      = false;
            lblnman.Visible      = false;
            lbleman.Visible      = false;
            ddlEvaluator.Items.Clear();
        }
    }
Esempio n. 19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        txtdatavalue.Attributes.Add("onkeypress", "return isNumberKey(event)");
        if (GetSessionUserID() == 0)
        {
            Response.Redirect("~/account/login.aspx");
        }

        if (!IsPostBack)
        {
            //rbtnLatest.Checked = true;
            rdoCPEntryFlag.SelectedIndex = 1;
            BindFleetDLL();
            DDLFleet.SelectedValue = Session["USERFLEETID"].ToString();
            BindVesselDDL();
            ViewState["SORTBYCOLOUMN"] = null;
            BindCPEntries();

            ddlDatatype.DataSource     = BLL_OPS_VoyageReports.OPS_SP_Get_CPEntriesType();
            ddlDatatype.DataTextField  = "DataType";
            ddlDatatype.DataValueField = "id";
            ddlDatatype.DataBind();
            ListItem alltype = new ListItem("SELECT ALL", "0");
            ddlDatatype.Items.Insert(0, alltype);

            //BLL_Infra_UserCredentials objUser = new BLL_Infra_UserCredentials();
            //ddlUser.DataSource = objUser.Get_UserList();
            DataTable dt     = objBLLUser.Get_UserList();
            string    filter = "User_type ='OFFICE USER' ";


            dt.DefaultView.RowFilter = filter;

            ddlUser.DataSource = dt.DefaultView.ToTable();

            ddlUser.DataTextField  = "USER_NAME";
            ddlUser.DataValueField = "userid";
            ddlUser.DataBind();
            ListItem alluser = new ListItem("SELECT ALL", "0");
            ddlUser.Items.Insert(0, alluser);


            BLL_Infra_VesselLib objVsl = new BLL_Infra_VesselLib();

            DataTable dtVessel = objVsl.Get_VesselList(0, 0, Convert.ToInt32(Session["USERCOMPANYID"].ToString()), "", Convert.ToInt32(Session["USERCOMPANYID"].ToString()));
            ddlvesselCP.Items.Clear();
            ddlvesselCP.DataSource     = dtVessel;
            ddlvesselCP.DataTextField  = "Vessel_name";
            ddlvesselCP.DataValueField = "Vessel_id";
            ddlvesselCP.DataBind();
            ListItem li = new ListItem("--SELECT ALL--", "0");
            ddlvesselCP.Items.Insert(0, li);


            ddldatatypeCP.DataSource     = BLL_OPS_VoyageReports.OPS_SP_Get_CPEntriesType();
            ddldatatypeCP.DataTextField  = "DataType";
            ddldatatypeCP.DataValueField = "id";
            ddldatatypeCP.DataBind();
            ListItem lix = new ListItem("--SELECT ALL--", "0");
            ddldatatypeCP.Items.Insert(0, lix);
        }
    }