private bool CreateUserDesignation()
        {
            objDesignation    = new Designation();
            objDesignationBiz = new DesignationBiz();

            objDesignation.DesignationName = txtDesignationNameAdd.Text.Trim();
            objDesignation.UserId          = Convert.ToInt16(Session["UserId"].ToString());

            MessageBox(objDesignationBiz.CreateDesignation(objDesignation));
            return(true);
        }
Beispiel #2
0
        private void GvBindDesignation()
        {
            objDesignation    = new Designation();
            objDesignationBiz = new DesignationBiz();
            DataTable dtDesignation = new DataTable();

            dtDesignation            = objDesignationBiz.GetDesignation(txtDesignationSearch.Text.Trim());
            gvDesignation.DataSource = dtDesignation;
            gvDesignation.DataBind();
            gvDesignation.ShowHeaderWhenEmpty = true;
            gvDesignation.EmptyDataText       = "No data found!";
        }
Beispiel #3
0
        private bool EditDesignation()
        {
            objDesignation    = new Designation();
            objDesignationBiz = new DesignationBiz();
            GridViewRow row = gvDesignation.SelectedRow;

            objDesignation.DesignationId   = Convert.ToByte(gvDesignation.DataKeys[row.RowIndex].Values[0].ToString());
            objDesignation.DesignationName = txtDesignationNameEdit.Text.Trim();
            objDesignation.IsActive        = ddlUserStatus.SelectedValue == "1";
            objDesignation.UpdatedBy       = Convert.ToInt16(Session["UserId"]);

            return(objDesignationBiz.UpdateDesignation(objDesignation));
        }
Beispiel #4
0
        private void GvBindDesignation()
        {
            objDesignation    = new Designation();
            objDesignationBiz = new DesignationBiz();
            DataTable dtDesignation = new DataTable();

            dtDesignation            = objDesignationBiz.GetDesignation(txtDesignationSearch.Text.Trim());
            gvDesignation.DataSource = dtDesignation;
            gvDesignation.DataBind();
            gvDesignation.ShowHeaderWhenEmpty           = true;
            gvDesignation.EmptyDataText                 = "No data found!";
            gvDesignation.AlternatingRowStyle.BackColor = Color.AliceBlue;
            gvDesignation.SelectedRowStyle.BackColor    = Color.DarkKhaki;
        }
Beispiel #5
0
        private void PopulateDropDownForDesignation()
        {
            objDesignation    = new Designation();
            objDesignationBiz = new DesignationBiz();

            List <Designation> objDesignationList = new List <Designation>();

            objDesignationList            = objDesignationBiz.GetDesignationList();
            ddlDesignation.DataSource     = objDesignationList;
            ddlDesignation.DataTextField  = "DesignationName";
            ddlDesignation.DataValueField = "DesignationId";
            ddlDesignation.DataBind();

            ddlDesignation.Items.Insert(0, new ListItem("--Select Designation--", "0"));
            //ddlDesignation.Items[0].Selected = true;
            //ddlDesignation.Items[0].Attributes["Disabled"] = "Disabled";
        }