Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUtilities.CheckSession();
        if (!IsPostBack)
        {
            SetControl(eControl.PriceList);

            int FirmId = 0, OrganizationId = 0;
            CU.GetFirmOrganizationId(ref FirmId, ref OrganizationId);
            lblFirmId.Text         = FirmId.ToString();
            lblOrganizationId.Text = OrganizationId.ToString();

            CU.LoadDisplayPerPage(ref ddlRecordPerPage);

            LoadPriceListGrid(ePageIndex.Custom);
            CheckVisibleButton();
        }

        Confirmationpopup.btnActivePopup_OnClick   += new EventHandler(btnActive_OnClick);
        Confirmationpopup.btnDeactivePopup_OnClick += new EventHandler(btnDeactive_OnClick);
        Confirmationpopup.btnDeletePopup_OnClick   += new EventHandler(btnDelete_OnClick);

        try { grdPriceList.HeaderRow.TableSection = TableRowSection.TableHeader; }
        catch { }
    }
    public static void Login(int UsersId, bool RememberMe)
    {
        LoginUtilities.WriteSession(UsersId);
        LoginUtilities.WriteCookies(RememberMe);

        Redirect(eLoginType.Manual, UsersId);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUtilities.CheckSession();

        string SessionId = "0";

        try { SessionId = Session[LoginUtilities.SessionId].ToString(); } catch { }

        LoginUtilities.RemoveSession();
        LoginUtilities.RemoveCookies();
        if (Request.QueryString.Count > 0 && Request.QueryString["loginurl"] != null)
        {
            Response.Redirect("Login?" + "CheckUsersId".Encrypt() + "=" + SessionId.Encrypt() + "&" + BOL.CS.rurl.Encrypt() + "=" + Request.QueryString["loginurl"].ToString().Encrypt());
        }
        else
        {
            if (Request.QueryString[BOL.CS.rurl.Encrypt()] == null)
            {
                Response.Redirect("Login");
            }
            else
            {
                Response.Redirect("Login?" + BOL.CS.rurl.Encrypt() + "=" + Request.QueryString[BOL.CS.rurl.Encrypt()].ToString());
            }
        }
    }
Example #4
0
 public static PagoCreditoTarjeta verSiDebeAlgunPedido()
 {
     //bool tieneDeuda = false;
     try
     {
         PagoCreditoTarjeta objPago    = new PagoCreditoTarjeta();
         Usuario            objUsuario = LoginUtilities.GetUserLogged();
         if (objUsuario != null)
         {
             List <PagoCreditoTarjeta> listaPago = PagoCreditoTarjetaBLL.GetPedidoListUsuarioById(objUsuario.UsuarioId);
             listaPago = listaPago.OrderByDescending(p => p.FechaPago).ToList();
             if (listaPago.Count > 0)
             {
                 //if (listaPago[0].SaldoPagar > 0)
                 //{
                 objPago = listaPago[0];
                 return(objPago);
                 //}
             }
         }
         return(objPago);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUtilities.CheckSession();

        if (!IsPostBack)
        {
            CU.LoadDisplayPerPage(ref ddlRecordPerPage);

            LoadSearchCountry();
            LoadAreaGrid(ePageIndex.Custom);
            CheckVisibleButton();
        }

        Confirmationpopup.btnActivePopup_OnClick   += new EventHandler(btnActive_OnClick);
        Confirmationpopup.btnDeactivePopup_OnClick += new EventHandler(btnDeactive_OnClick);
        Confirmationpopup.btnDeletePopup_OnClick   += new EventHandler(btnDelete_OnClick);

        popupManageArea.btnSave_OnClick       += new EventHandler(btnSave_OnClick);
        popupManageArea.btnSaveAndNew_OnClick += new EventHandler(btnSaveAndNew_OnClick);

        popupManageCity.btnSave_OnClick    += new EventHandler(btnSaveCity_OnClick);
        poupManageState.btnSave_OnClick    += new EventHandler(btnSaveState_OnClick);
        popupManageCountry.btnSave_OnClick += new EventHandler(btnSaveCountry_OnClick);

        try { grdArea.HeaderRow.TableSection = TableRowSection.TableHeader; }
        catch { }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUtilities.CheckSession();

        if (!IsPostBack)
        {
            CU.LoadDisplayPerPage(ref ddlRecordPerPage);

            LoadSearchCountry();

            if (!string.IsNullOrEmpty(Request.QueryString[CS.CountryId.Encrypt()]))
            {
                try { ddlSearchCountry.SelectedValue = Request.QueryString[CS.CountryId.Encrypt()].ToString().Decrypt(); }
                catch { }
            }

            LoadStateGrid(ePageIndex.Custom);
            CheckVisibleButton();
        }

        Confirmationpopup.btnActivePopup_OnClick   += new EventHandler(btnActive_OnClick);
        Confirmationpopup.btnDeactivePopup_OnClick += new EventHandler(btnDeactive_OnClick);
        Confirmationpopup.btnDeletePopup_OnClick   += new EventHandler(btnDelete_OnClick);

        poupManageState.btnSave_OnClick       += new EventHandler(btnSave_OnClick);
        poupManageState.btnSaveAndNew_OnClick += new EventHandler(btnSaveAndNew_OnClick);

        popupManageCountry.btnSave_OnClick += new EventHandler(btnSaveCountry_OnClick);

        try { grdState.HeaderRow.TableSection = TableRowSection.TableHeader; }
        catch { }
    }
Example #7
0
 public void validarUsuario()
 {
     try
     {
         Usuario objUsuario = LoginUtilities.GetUserLogged();
         if (objUsuario != null)
         {
             if (!ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Ver_Acceso))
             {
                 Response.Redirect("~/Administracion/Error.aspx");
             }
             if (!ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Ver_Acceso))
             {
                 this.ListaAccesoGridView.Columns[0].Visible = false;
             }
         }
         else
         {
             Response.Redirect("~/Autentificacion/Login.aspx");
         }
     }
     catch (Exception ex)
     {
         log.Error("error al obtener el usuario logueado");
         throw ex;
     }
 }
Example #8
0
        protected void btn_reset_password_Click(object sender, EventArgs e)
        {
            try
            {
                lbl_error.Text = "";

                string      error;
                Credentials credential = new Credentials();
                credential.UserName = txt_user_name.Text;
                credential.Password = FormsAuthentication.HashPasswordForStoringInConfigFile(txt_confirm_new_password.Text, "SHA1");//LoginUtilities.PasswordHash(txt_user_name.Text + txt_confirm_new_password.Text);
                bool returnvalue = LoginUtilities.ResetPassword(credential, out error);
                lbl_error.Text = error;
                if (error == "")
                {
                    string popupScript = "";
                    popupScript = "<script language='javascript'>showsuccessToast('Password has been updated successfully');</script>";
                    Page.ClientScript.RegisterStartupScript(typeof(Page), "popupScript", popupScript);
                    Response.Redirect("~/Login.aspx");
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUtilities.CheckSession();

        aSearchService.HRef = "SearchService.aspx?" + CS.OrganizationId.Encrypt() + "=" + CU.GetOrganizationId().ToString().Encrypt();
        aSearchProduct.HRef = "SearchProduct.aspx?" + CS.OrganizationId.Encrypt() + "=" + CU.GetOrganizationId().ToString().Encrypt();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUtilities.CheckSession();
        LoginUsersId = CU.GetUsersId();

        if (!IsPostBack)
        {
            lblOrganizationId.Text = CU.GetOrganizationId().ToString();
            lblFirmId.Text         = CU.GetFirmId().ToString();

            CU.LoadDisplayPerPage(ref ddlRecordPerPage);

            txtFromDate.Text = IndianDateTime.Today.AddDays(-50).ToString(CS.ddMMyyyy);
            txtToDate.Text   = IndianDateTime.Today.ToString(CS.ddMMyyyy);

            LoadUser();

            LoadWalletGrid(ePageIndex.Custom);
            CheckVisibleButton();
        }

        Confirmationpopup.btnActivePopup_OnClick   += new EventHandler(btnActive_OnClick);
        Confirmationpopup.btnDeactivePopup_OnClick += new EventHandler(btnDeactive_OnClick);
        Confirmationpopup.btnDeletePopup_OnClick   += new EventHandler(btnDelete_OnClick);

        try { grdWallet.HeaderRow.TableSection = TableRowSection.TableHeader; }
        catch { }
    }
Example #11
0
    public void validarUsuario()
    {
        Usuario objUsuario = LoginUtilities.GetUserLogged();

        if (objUsuario != null)
        {
            if (!ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Crear_Acceso) &&
                !ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Eliminar_Acceso))
            {
                Response.Redirect("~/Administracion/Error.aspx");
            }
            if (!ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Crear_Acceso))
            {
                addAllModuloButton.Visible = false;
                AddAccesoButton.Visible    = false;
            }
            if (!ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Eliminar_Acceso))
            {
                RemoveAllModuloButton.Visible = false;
                removeAccesoButton.Visible    = false;
            }
        }
        else
        {
            Response.Redirect("~/Autentificacion/Login.aspx");
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUtilities.CheckSession();

        if (!IsPostBack)
        {
            lblFirmId.Text = CU.GetFirmId().ToString();
            CU.LoadDisplayPerPage(ref ddlRecordPerPage);

            var DesignationId = CU.GeteDesignationId(CU.GetUsersId());
            divorganization.Visible = divFirm.Visible = DesignationId == eDesignation.SystemAdmin;

            LoadOrganization();
            LoadFirm();

            SetControl(eControl.User);
        }

        Confirmationpopup.btnActivePopup_OnClick   += new EventHandler(btnActive_OnClick);
        Confirmationpopup.btnDeactivePopup_OnClick += new EventHandler(btnDeactive_OnClick);
        Confirmationpopup.btnDeletePopup_OnClick   += new EventHandler(btnDelete_OnClick);

        ManageUserCC.btnSaveUser_OnClick       += new EventHandler(btnSaveUser_OnClick);
        ManageUserCC.btnSaveAndNewUser_OnClick += new EventHandler(btnSaveAndNewUser_OnClick);

        ManageAuthority.btnCancel_OnClick += new EventHandler(lnkCancelAuthority_OnClick);

        try { grdUser.HeaderRow.TableSection = TableRowSection.TableHeader; }
        catch { }
    }
Example #13
0
    private bool SaveData()
    {
        if (!IsValidate())
        {
            return(false);
        }

        lblAddressId.Text = ManageAddress.SaveAddress(lblAddressId.zToInt()).ToString();

        string Message = string.Empty;
        int?   UsersId = null;
        var    objUser = new Users()
        {
            FirmId        = ddlFirm.zToInt(),
            Name          = txtName.Text,
            AddressId     = lblAddressId.zToInt(),
            DesignationId = ddlDesignation.zToInt(),
            MobileNo      = txtMobileNo.Text.Trim(),
            ParentUsersId = ddlParentUser.zToInt(),
            PriceListId   = ddlPriceList.zToInt(),           //??
            Email         = txtEmail.Text,
            Description   = txtDescription.Text,
        };

        if (IsEditMode())
        {
            UsersId         = lblUsersId.zToInt();
            objUser.UsersId = UsersId;
            objUser.Update();

            Message = "User Detail Change Sucessfully";

            if (!txtPassword.zIsNullOrEmpty())
            {
                LoginUtilities.ChangePassword(UsersId.Value, txtPassword.Text);
            }
        }
        else
        {
            objUser.eStatus = (int)eStatus.Active;
            UsersId         = objUser.Insert();

            LoginUtilities.CreateLogin(UsersId.Value, txtUserName.Text.ToLower(), txtPassword.Text);

            CU.SetDefaultAuthority(UsersId.Value, objUser.DesignationId.Value);

            Message = "User Added Sucessfully";
        }

        ManageContact.SaveContactDetail(UsersId.Value, (int)eParentType.User);

        lblUsersId.Text = UsersId.ToString();

        CU.ZMessage(eMsgType.Success, string.Empty, Message);

        SetUsersId = string.Empty;
        return(true);
    }
Example #14
0
 public static bool GetCarritoIdForUsuarioIniciado(int userId, HttpContext context)
 {
     try
     {
         bool   existeCarrito = false;
         string carritoId     = "";
         FoodGood.Carrito.Carrito objCarrito = CarritoBLL.GetCarritoByIdUsurio(userId);
         if (objCarrito != null)
         {
             carritoId = objCarrito.CarritoId;
             string     cookieName = "FoodGoodCartId";
             HttpCookie cookie     = context.Request.Cookies[cookieName];
             if (cookie == null)
             {
                 cookie         = new HttpCookie(cookieName, carritoId);
                 cookie.Expires = DateTime.Now.AddDays(365);
                 context.Response.Cookies.Add(cookie);
             }
             else
             {
                 try
                 {
                     string valorLogin       = LoginUtilities.ObtenerLoginCookies();
                     JavaScriptSerializer js = new JavaScriptSerializer();
                     Dictionary <string, DatorProductoCarrito> carritoNuevo   = PedidoUtilities.GetCarrito();
                     Dictionary <string, DatorProductoCarrito> carritoAntiguo = js.Deserialize <Dictionary <string, DatorProductoCarrito> >(objCarrito.Contenido);
                     foreach (KeyValuePair <string, DatorProductoCarrito> recorrido in carritoAntiguo)
                     {
                         if (!carritoNuevo.ContainsKey(recorrido.Key))
                         {
                             carritoNuevo.Add(recorrido.Key, recorrido.Value);
                             UpdateCarrito(carritoNuevo);
                         }
                     }
                     CarritoBLL.DeleteCarrito(objCarrito.CarritoId);
                 }
                 catch (Exception ex)
                 {
                     //error fucionar las lista de articulos de carrito
                     throw ex;
                 }
             }
             //string cookieEmailName = "KomodoSuscription";
             //HttpCookie cookieEmail = context.Request.Cookies[cookieEmailName];
             //if (cookieEmail == null)
             //{
             //    cookie = new HttpCookie(cookieEmailName, cookieEmailName);
             //    cookie.Expires = DateTime.Now.AddDays(365);
             //    context.Response.Cookies.Add(cookie);
             //}
             existeCarrito = true;
         }
         return(existeCarrito);
     }
     catch (Exception ex)
     { throw ex; }
 }
Example #15
0
        private void InsertOrUpdateEmployeeLogs()
        {
            string error;

            EmployeeLogsBO.UserLogin = UserName.Text;
            string UserID = LoginUtilities.GetUserID(UserName.Text);

            EmployeeLogsBO.EmployeeID = Convert.ToInt32(UserID);
            string a = SecurityClient.InsertUpdateEmployeeLogs(EmployeeLogsBO, out error);
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUtilities.CheckSession();
        if (!IsPostBack)
        {
            LoadProfileDetail();
        }

        ConfirmPopupRemoveProfile.btnConfirm_OnClick += new EventHandler(btnConfirmRemoveProfile_OnClick);
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUtilities.CheckSession();

        if (!IsPostBack)
        {
            lblOrganizationId.Text = CU.GetOrganizationId().ToString();
            LoadData();
        }
    }
    protected void btnChangePassword_OnClick(object sender, EventArgs e)
    {
        if (!IsPasswordValidate())
        {
            return;
        }

        LoginUtilities.ChangePassword(CU.GetUsersId(), txtNewPasswordMaster.Text);
        CU.ZMessage(eMsgType.Success, string.Empty, "Password Change Successfully");
    }
    public static void CheckSession(bool IsRedirect)
    {
        if (HttpContext.Current.Request.QueryString["UserName"] != null &&
            HttpContext.Current.Request.QueryString["Password"] != null)
        {
            LoginUtilities.LoginIfValid(HttpContext.Current.Request.QueryString["UserName"].ToString(), HttpContext.Current.Request.QueryString["Password"].ToString(), true);
        }

        if (HttpContext.Current.Session[SessionId] == null)
        {
            if (HttpContext.Current.Request.Cookies[CS._CurrentLoginTime] != null && HttpContext.Current.Request.Cookies[CS._PrevVisit] != null)
            {
                string cl_user = HttpContext.Current.Request.Cookies[CS._CurrentLoginTime].Value;
                string ltocu   = HttpContext.Current.Request.Cookies[CS._PrevVisit].Value;

                var dtCookie = new LoginCookie()
                {
                    CookieClUser = cl_user, CookieLtocu = ltocu
                }.Select(new LoginCookie()
                {
                    CookieExpireTime = IndianDateTime.Now
                });
                if (dtCookie.Rows.Count > 0 && Convert.ToDateTime(dtCookie.Rows[0][CS.CookieExpireTime]) > IndianDateTime.Now)
                {
                    if (!IsValidUsersId(CC.DecryptCookies(cl_user, ltocu)))
                    {
                        if (IsRedirect)
                        {
                            HttpContext.Current.Response.Redirect("Logout.aspx?" + CS.rurl.Encrypt() + "=" + HttpContext.Current.Request.Url.ToString().Encrypt());
                        }
                    }
                    else
                    {
                        WriteSession(int.Parse(CC.DecryptCookies(cl_user, ltocu)));
                    }
                }
                else
                {
                    if (IsRedirect)
                    {
                        HttpContext.Current.Response.Redirect("Login.aspx?" + CS.rurl.Encrypt() + "=" + HttpContext.Current.Request.Url.ToString().Encrypt());
                    }
                }
            }
            else
            {
                if (IsRedirect)
                {
                    HttpContext.Current.Response.Redirect("Login.aspx?" + CS.rurl.Encrypt() + "=" + HttpContext.Current.Request.Url.ToString().Encrypt());
                }
            }
        }

        CU.GetMasterPageLabel("lblMstUsersId").Text = CU.GetUsersId().ToString();
    }
Example #20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Usuario user = LoginUtilities.GetUserLogged();
         if (user != null)
         {
             Response.Redirect("~/Default.aspx");
         }
     }
 }
    protected void btnResetPassword_Click(object sender, EventArgs e)
    {
        if (!IsValidatePassword())
        {
            txtNewPassword.Focus();
            return;
        }

        LoginUtilities.ChangePassword(GetUsersId().Value, txtNewPassword.Text);
        Response.Redirect("Login.aspx");
    }
Example #22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Usuario objUsuario = LoginUtilities.GetUserLogged();
            if (objUsuario != null)
            {
                queryHiddenField.Value = objUsuario.UsuarioId.ToString();

                cargarLIstaPedido(queryHiddenField.Value);
            }
        }
    }
        /// <summary>
        /// Send email with portal invite.
        /// </summary>
        protected virtual void SendInvites()
        {
            var usersForInvites = UserInvites.Where(x => x.Success);

            foreach (var userInvite in usersForInvites)
            {
                var passwordRecovery = LoginUtilities
                                       .GenerateRecoveryPasswordLink(UserConnection, userInvite.UserName, AppUrl);
                RegistrationHelper.RegistrationHelper
                .SendInvitationEmail(UserConnection, userInvite.Email, userInvite.ContactId,
                                     passwordRecovery.PasswordChangeUrl);
            }
        }
Example #24
0
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUtilities.CheckSession();
        if (!IsPostBack)
        {
            CU.LoadDisplayPerPage(ref ddlRecordPerPage);

            LoadCartGrid(ePageIndex.Custom);
        }

        try { grdCart.HeaderRow.TableSection = TableRowSection.TableHeader; }
        catch { }
    }
Example #25
0
        public static void UpdateCarrito(Dictionary <string, DatorProductoCarrito> carrito, HttpContext context)
        {
            try
            {
                string cartId = obtenerIdCarrito(context);

                //FoodGood.Carrito.Carrito cartTemp = CarritoBLL.GetCarritoById(cartId);
                //if (cartTemp.conservarCarrito)
                //{
                //    CloneAndRemoveOldCart(cartTemp.Email, cartTemp.UserId);
                //    return;
                //}

                JavaScriptSerializer js = new JavaScriptSerializer();
                string jsonCart         = js.Serialize(carrito);

                //TODO: Actualizar carrito en la base de datos

                //string email = null;
                int?usuarioId = null;

                //if (!string.IsNullOrEmpty(SuscripcionUtilities.GetCorreoSuscripto()))
                //{
                //    email = SuscripcionUtilities.GetCorreoSuscripto();
                //}
                //if (context.User.Identity.IsAuthenticated)
                //{
                //    usuarioId = UserBLL.GetUserByUsername(context.User.Identity.Name).UserId;
                //    email = UserBLL.GetUserByUsername(context.User.Identity.Name).Email;
                //}

                string clave = LoginUtilities.ObtenerLoginCookies();
                FoodGood.Usuario.Usuario user = LoginUtilities.LoginUser(clave);
                if (user != null)
                {
                    usuarioId = user.UsuarioId;
                }

                FoodGood.Carrito.Carrito obj = new FoodGood.Carrito.Carrito();
                obj.CarritoId = cartId;
                obj.UsuarioId = usuarioId;
                obj.Contenido = jsonCart;
                obj.Fecha     = DateTime.Now;

                CarritoBLL.UpdateCarrtio(obj);
            }
            catch (Exception ex)
            { log.Error("Error al actualizar el carrito en la base de datos", ex); }
        }
Example #26
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Usuario objUsuario = LoginUtilities.GetUserLogged();
         if (objUsuario != null)
         {
             cargarPedido("");
         }
         else
         {
             Response.Redirect("~/Autentificacion/Login.aspx");
         }
     }
 }
    public static void Redirect(eLoginType LoginType, int UsersId)
    {
        HttpBrowserCapabilities browser = HttpContext.Current.Request.Browser;

        LoginUtilities.LoginEntry(UsersId, LoginType, HttpContext.Current.Request.UserAgent, ref browser);

        if (HttpContext.Current.Request.QueryString[CS.rurl.Encrypt()] == null)
        {
            HttpContext.Current.Response.Redirect("Default.aspx");
        }
        else
        {
            HttpContext.Current.Response.Redirect(HttpContext.Current.Request.QueryString[CS.rurl.Encrypt()].ToString().Decrypt());
        }
    }
Example #28
0
    public static string ExisteUsuarioIniciado()
    {
        try
        {
            string loginCookie = LoginUtilities.ObtenerLoginCookies();

            if (string.IsNullOrEmpty(loginCookie))
            {
                return(null);
            }
            return(loginCookie);
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
Example #29
0
    public void validarUsuario()
    {
        try
        {
            Usuario objUsuario = LoginUtilities.GetUserLogged();
            if (objUsuario != null)
            {
                if (!ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Crear_Cliente) &&
                    !ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Editar_Cliente) &&
                    !ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Eliminar_Cliente) &&
                    !ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Ver_Cliente))
                {
                    Response.Redirect("~/Administracion/Error.aspx");
                }
                if (!ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Crear_Cliente))
                {
                    NewUsuarioButton.Visible = false;
                }

                if (!ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Ver_Cliente))
                {
                    ListaUsuariosGridView.Visible = false;
                }
                else
                {
                    if (!ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Editar_Cliente))
                    {
                        this.ListaUsuariosGridView.Columns[0].Visible = false;
                    }
                    if (!ModuloBLL.validarSiExisteModulo(objUsuario.UsuarioId, Resources.Validacion.Eliminar_Cliente))
                    {
                        this.ListaUsuariosGridView.Columns[1].Visible = false;
                    }
                }
            }
            else
            {
                Response.Redirect("~/Autentificacion/Login.aspx");
            }
        }
        catch (Exception ex)
        {
            log.Error("erro al validar al Usuario");
            throw ex;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        LoginUtilities.CheckSession();
        if (!IsPostBack)
        {
            CU.LoadDisplayPerPage(ref ddlRecordPerPage);

            LoadOrganizationGrid(ePageIndex.Custom);
            CheckVisibleButton();
        }

        Confirmationpopup.btnActivePopup_OnClick   += new EventHandler(btnActive_OnClick);
        Confirmationpopup.btnDeactivePopup_OnClick += new EventHandler(btnDeactive_OnClick);
        Confirmationpopup.btnDeletePopup_OnClick   += new EventHandler(btnDelete_OnClick);

        try { grdOrganization.HeaderRow.TableSection = TableRowSection.TableHeader; }
        catch { }
    }