Exemple #1
0
        //Get All Role Data
        #region [Get All Role Data]

        public void GetAllRoleData()
        {
            try
            {
                if (DDL_Role.SelectedItem.Text == "Select")
                {
                    GrdAssinedRole.DataSource = EmptyGridView();
                    GrdAssinedRole.DataBind();

                    GrdEmployee.DataSource = EmptyGridView();
                    GrdEmployee.DataBind();
                }
                else
                {
                    objEWA                = new EWA_Role();
                    objEWA.UserType       = DDL_Role.SelectedItem.Text;
                    objEWA.OrganizationId = Convert.ToInt32(Session["OrgId"].ToString());
                    objEWA.IsActive       = true;

                    DataSet ds = new DataSet();
                    ds = objBL.GetRole_BL(objEWA);

                    BindGrids(ds);
                }
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message);
            }
        }
Exemple #2
0
        //Delete Role
        #region [Delete Role]

        public void DeleteRole(string Uid)
        {
            try
            {
                objEWA        = new EWA_Role();
                objEWA.Action = "DeleteRole";

                objEWA.UserId         = Uid;
                objEWA.OrganizationId = Convert.ToInt32(Session["OrgId"].ToString());

                objBL.DeleteRole_BL(objEWA);

                DDL_Role.ClearSelection();

                GrdAssinedRole.DataSource = EmptyGridView();
                GrdAssinedRole.DataBind();

                GrdEmployee.DataSource = EmptyGridView();
                GrdEmployee.DataBind();

                msgBox.ShowMessage("Role removed Successfully !!!", "Successfull", UserControls.MessageBox.MessageStyle.Successfull);
                //GeneralErr("Role removed Successfully !!!");
            }
            catch (Exception exp)
            {
                GeneralErr(exp.Message);
            }
        }
Exemple #3
0
        //Delete Role
        #region [Bind Class]

        public DataSet DeleteRole_BL(EWA_Role ObjEWA)
        {
            try
            {
                DL_Role objDL = new DL_Role();
                DataSet ds    = objDL.DeleteRole_DL(ObjEWA);
                return(ds);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #4
0
        //Delete Role
        #region [Bind Class]

        public DataSet DeleteRole_DL(EWA_Role ObjEWA)
        {
            DataSet ds = new DataSet();

            try
            {
                prmList    = new string[6];
                prmList[0] = "@Action";
                prmList[1] = "DeleteRole";
                prmList[2] = "@OrganizationId";
                prmList[3] = ObjEWA.OrganizationId.ToString();
                prmList[4] = "@UserCode";
                prmList[5] = ObjEWA.UserId.ToString();

                ds = ObjHelper.FillControl(prmList, "SP_Role");
                return(ds);
            }
            catch (Exception)
            {
                throw;
            }
        }