Esempio n. 1
0
        protected void gvRoles_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "Select")
            {
                Guid            ID    = Guid.Parse(e.CommandArgument.ToString());
                GridViewRow     row   = (GridViewRow)(((LinkButton)e.CommandSource).NamingContainer);
                int             index = row.RowIndex;
                MDMSVC.DC_Roles _obj  = new MDMSVC.DC_Roles();
                _obj.RoleID   = Convert.ToString(ID);
                _obj.RoleName = System.Web.HttpUtility.HtmlDecode(gvRoles.Rows[index].Cells[0].Text);
                //Label lblEntityType = (Label)gvRoles.Rows[index].Cells[1].FindControl("lblEntityType");
                //_obj.EntityType = System.Web.HttpUtility.HtmlDecode(lblEntityType.Text);
                //Label lblEntityTypeID = (Label)gvRoles.Rows[index].Cells[1].FindControl("lblEntityTypeID");
                //_obj.EntityTypeID = System.Web.HttpUtility.HtmlDecode(lblEntityTypeID.Text);

                List <MDMSVC.DC_Roles> rl = new List <MDMSVC.DC_Roles>();
                rl.Add(_obj);
                frmRoledetail.ChangeMode(FormViewMode.Edit);
                frmRoledetail.DataSource = rl;
                frmRoledetail.DataBind();
                TextBox txtRoleName    = (TextBox)frmRoledetail.FindControl("txtRoleName");
                Label   lblApplication = (Label)frmRoledetail.FindControl("lblApplication");
                // DropDownList ddlEntityType = (DropDownList)frmRoledetail.FindControl("ddlEntityType");

                lblApplication.Text = Convert.ToString(ddlApplilcation.SelectedItem);
                txtRoleName.Text    = _obj.RoleName;
                //BindEntityType();
                // ddlEntityType.SelectedValue = _obj.EntityTypeID;
            }
        }
Esempio n. 2
0
        public bool IsRoleExist(MDMSVC.DC_Roles rol)
        {
            object result = null;

            ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Admin_Roles_IsRoleExist"], rol, typeof(MDMSVC.DC_Roles), typeof(bool), out result);
            return((bool)result);
        }
Esempio n. 3
0
        public bool AddUpdateRoleEntityType(MDMSVC.DC_Roles rol)
        {
            object result = null;

            ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Admin_Roles_AddEntityWithRole"], rol, typeof(MDMSVC.DC_Roles), typeof(bool), out result);
            return((bool)result);
        }
Esempio n. 4
0
        public List <MDMSVC.DC_Roles> GetAllRoleByEntityType(MDMSVC.DC_Roles rol)
        {
            object result = null;

            ServiceConnection.MDMSvcProxy.PostData(ConfigurationManager.AppSettings["Admin_Roles_ByEntityType"], rol, typeof(MDMSVC.DC_Roles), typeof(List <MDMSVC.DC_Roles>), out result);
            return(result as List <DC_Roles>);
        }