Esempio n. 1
0
 protected void Page_Init(object sender, EventArgs e)
 {
     if (PrincipalHelper.IsUserSuperAdmin() || PrincipalHelper.IsUserAdmin())
     {
         ASPxGridViewZaposleni.DataBind();
         InitializeEditDeleteButtons();
     }
     else
     {
         RedirectHome();
     }
 }
Esempio n. 2
0
        protected void EmployeeCallback_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
        {
            if (e.Parameter == "RefreshGrid")
            {
                InitializeEditDeleteButtons();
                ASPxGridViewZaposleni.DataBind();
            }
            else
            {
                object valueID = null;
                if (ASPxGridViewZaposleni.VisibleRowCount > 0)
                {
                    valueID = ASPxGridViewZaposleni.GetRowValues(ASPxGridViewZaposleni.FocusedRowIndex, "idOsebe");
                }

                bool isValid = SetSessionsAndOpenPopUp(e.Parameter, Enums.EmployeeSession.EmployeePopUpId, valueID);
                if (isValid)
                {
                    ASPxPopupControl_Employee.ShowOnPageLoad = true;
                }
            }
        }