Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(TimeSchedule), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }

                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(TimeCode), null, penaltyDetailGrid, null, null);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    penaltyDetailGrid.Disabled = true;
                    return;
                }
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();

                if (_systemService.SessionHelper.CheckIfIsAdmin())
                {
                    return;
                }
                dateCol.Format           = _systemService.SessionHelper.GetDateformat();
                CompanyFilesClassId.Text = ClassId.DMDO.ToString();
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(Attachement), EditDocumentForm, GridPanel1, btnAdd, SaveDocumentButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
                //    var properties = AccessControlApplier.GetPropertiesLevels(typeof(Attachement));
                //    if (properties.Where(x => x.index == "url").ToList()[0].accessLevel == 0)
                //    {
                //        var s = GridPanel1.ColumnModel.Columns[GridPanel1.ColumnModel.Columns.Count - 1];
                //        s.Renderer.Handler = s.Renderer.Handler.Replace("attachRender()", "' '");
                //    }
            }
        }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!X.IsAjaxRequest && !IsPostBack)
     {
         SetExtLanguage();
         HideShowButtons();
         HideShowColumns();
         CurrentCountry.Text = "Lebanon";
         if (_systemService.SessionHelper.CheckIfIsAdmin())
         {
             return;
         }
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(Geofence), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
             // ApplyLocationAccessControl();
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             Viewport1.Hidden = true;
             return;
         }
         viewOnly.Text = lat.ReadOnly.ToString();
         noAccess.Text = (lat.InputType == InputType.Password).ToString();
         if (noAccess.Text == "True")
         {
             mapHolder.Hidden        = true;
             EditRecordWindow.Width  = 400;
             EditRecordWindow.Height = 250;
         }
     }
 }
Ejemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!X.IsAjaxRequest && !IsPostBack)
     {
         SetExtLanguage();
         HideShowButtons();
         HideShowColumns();
         PE_startDate.Format = PE_endDate.Format = yearFrom.Format = yearTo.Format = periodFrom.Format = periodTo.Format = _systemService.SessionHelper.GetDateformat();
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(FiscalYear), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             Viewport1.Hidden = true;
             return;
         }
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(FiscalPeriod), null, YearPeriods, null, null);
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             YearPeriods.Hidden = true;
             return;
         }
     }
 }
Ejemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!X.IsAjaxRequest && !IsPostBack)
     {
         SetExtLanguage();
         HideShowButtons();
         HideShowColumns();
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(SocialSecuritySchedule), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             Viewport1.Hidden = true;
             return;
         }
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(SocialSecurityScheduleSetup), socialSetupForm, socialSetupGrid, ADDNewsocialSetupBtn, saveSocialbutton);
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             Viewport1.Hidden = true;
             return;
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(UserInfoSelfService), BasicInfoTab, null, null, SaveButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied, "closeCurrentTab()").Show();

                    return;
                }

                if (string.IsNullOrEmpty(_systemService.SessionHelper.GetCurrentUserId().ToString()))
                {
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorOperation).Show();
                }



                this.EditRecordWindow.Title = Resources.Common.EditWindowsTitle;
                this.EditRecordWindow.Show();
            }
        }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();

                startingDate.Value = DateTime.Now;
                employeeFilter.AddItem(GetGlobalResourceObject("Common", "All").ToString(), 0);
                employeeFilter.Select(0);
                FillBranch();
                //startingDate.MinDate = DateTime.Now.AddDays(-180);

                // endingDate.MinDate = startingDate.SelectedDate;
                endingDate.Value = DateTime.Now;

                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(FlatSchedule), null, null, null, null);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
            }
        }
Ejemplo n.º 8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!X.IsAjaxRequest && !IsPostBack)
     {
         SetExtLanguage();
         HideShowButtons();
         HideShowColumns();
         ColDate.Format = _systemService.SessionHelper.GetDateformat();
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(TimePerformance), null, GridPanel1, null, null);
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             Viewport1.Hidden = true;
             return;
         }
         chartStore.Data = new TimePerformance {
             dateString = DateTime.Now.ToString(_systemService.SessionHelper.GetDateformat(), CultureInfo.CurrentCulture), approved = 0, duration = 0, pending = 0, rejected = 0
         };
         chartStore.DataBind();
     }
 }
Ejemplo n.º 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();
                Column6.Format        = DateColumn1.Format = date.Format = effectiveDate.Format = _systemService.SessionHelper.GetDateformat();
                effectiveDate.MaxDate = DateTime.Now;

                //statusPref.Select("0");

                /*  c.Format = /cc.Format =*/

                //if (string.IsNullOrEmpty(Request.QueryString["employeeId"]))
                //    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorOperation).Show();
                //CurrentEmployee.Text = Request.QueryString["employeeId"];

                //cc.Format = _systemService.SessionHelper.GetDateformat();
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(Loan), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
            }
        }
Ejemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();


                activeStatusStore.DataSource = Common.XMLDictionaryList(_systemService, "16");
                activeStatusStore.DataBind();
                if (_systemService.SessionHelper.CheckIfIsAdmin())
                {
                    return;
                }
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(BusinessPartner), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
            }
        }
Ejemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();

                try
                {
                    try
                    {
                        AccessControlApplier.ApplyAccessControlOnPage(typeof(Model.Reports.RT401), null, null, null, null);
                    }
                    catch (AccessDeniedException exp)
                    {
                        X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                        X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                        Viewport1.Hidden = true;
                        return;
                    }

                    format.Text = _systemService.SessionHelper.GetDateformat().ToUpper();
                    ASPxWebDocumentViewer1.RightToLeft = _systemService.SessionHelper.CheckIfArabicSession() ? DevExpress.Utils.DefaultBoolean.True : DevExpress.Utils.DefaultBoolean.False;
                    //FillReport(false, false);
                }
                catch { }
            }
        }
Ejemplo n.º 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!X.IsAjaxRequest && !IsPostBack)
     {
         SetExtLanguage();
         HideShowButtons();
         HideShowColumns();
         actionTypeStore.DataSource = Common.XMLDictionaryList(_systemService, "31");
         actionTypeStore.DataBind();
         operStore.DataSource = Common.XMLDictionaryList(_systemService, "32");
         operStore.DataBind();
         languageStore.DataSource = Common.XMLDictionaryList(_systemService, "23");
         languageStore.DataBind();
         moduleStore.DataSource = Common.XMLDictionaryList(_systemService, "1");
         moduleStore.DataBind();
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(EntitlementDeduction), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             Viewport1.Hidden = true;
             return;
         }
     }
 }
Ejemplo n.º 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();
                date.Format = DateColumn1.Format = _systemService.SessionHelper.GetDateformat();
            }

            try
            {
                AccessControlApplier.ApplyAccessControlOnPage(typeof(MediaItem), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
            }
            catch (AccessDeniedException exp)
            {
                X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                Viewport1.Hidden = true;
                return;
            }
            if (rwFile.InputType == InputType.Password)
            {
                var s = GridPanel1.ColumnModel.Columns[GridPanel1.ColumnModel.Columns.Count - 1];
                s.Renderer.Handler = s.Renderer.Handler.Replace("attachRender()", " ' '");
            }
        }
Ejemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();
                approvalTypeStore.DataSource = Common.XMLDictionaryList(_systemService, "24");
                FillWorkFlowStore();


                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(LeaveType), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
                //   FillDepartment();
                apId.Text = "";
            }
        }
Ejemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();

                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(RT305), null, GridPanel1, null, null);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
                //dateRange1.DefaultStartDate = DateTime.Now.AddDays(-DateTime.Now.Day);
                //FillStatus();


                isSuperUser.Text = _systemService.SessionHelper.GetUserType() == 1 ? "true" : "false";
            }
        }
Ejemplo n.º 16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                if (_systemService.SessionHelper.CheckIfIsAdmin())
                {
                    return;
                }
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(SystemAlert), null, GridPanel1, null, null);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
                //var properties = AccessControlApplier.GetPropertiesLevels(typeof(SystemAlert));
                //foreach (var item in properties)
                //{
                //    var result = GridPanel1.ColumnModel.Columns.Where(x => x.DataIndex == item.index).ToList();
                //    if (result.Count > 0)
                //    {
                //        switch(item.accessLevel)
                //        {
                //            case 0:
                //                result[0].Renderer = new Renderer("return '***';");
                //                result[0].Disabled = true;
                //                if (result[0] is WidgetColumn)
                //                {
                //                    ((result[0] as WidgetColumn).Widget[0] as Field).InputType = InputType.Password;
                //                    (result[0] as WidgetColumn).Widget[0].Disabled = true;
                //                }
                //                break;
                //            case 1:
                //                result[0].Disabled = true;
                //                if (result[0] is WidgetColumn)
                //                {

                //                    (result[0] as WidgetColumn).Widget[0].Disabled = true;
                //                }
                //                break;
                //            default: break;

                //        }



                //    }


                //}
            }
        }
Ejemplo n.º 17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(Model.Employees.Profile.ImportEmployees), null, null, null, null);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
                BatchStatusRequest req = new BatchStatusRequest();
                req.classId = ClassId.TAOT;
                RecordResponse <BatchOperationStatus> resp = _systemService.ChildGetRecord <BatchOperationStatus>(req);
                if (!resp.Success || resp.result == null)
                {
                    return;
                }
                switch (resp.result.status)
                {
                case 0:
                    Viewport1.ActiveIndex = 0;
                    break;

                case 1:


                    Viewport1.ActiveIndex = 1;
                    this.ResourceManager1.AddScript("{0}.startTask('longactionprogress');", this.TaskManager1.ClientID); break;

                case 2:
                    Viewport1.ActiveIndex = 1;
                    this.ResourceManager1.AddScript("{0}.startTask('longactionprogress');", this.TaskManager1.ClientID); break;

                case 3:
                    Viewport1.ActiveIndex = 2;
                    break;

                default: Viewport1.ActiveIndex = 0; break;
                }
            }
        }
Ejemplo n.º 18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();
                rwIssueDate.Format = rwExpiryDate.Format = _systemService.SessionHelper.GetDateformat();
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(CompanyRightToWork), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
                //issueDateMulti.InputType = issueDate.InputType;
                //issueDateMulti.Disabled = issueDate.Disabled;
                //issueDateMulti.ReadOnly = issueDate.ReadOnly;
                //issueDateDisabled.Text = issueDate.ReadOnly.ToString();


                //expiryDateMulti.InputType = expiryDate.InputType;
                //expiryDateMulti.Disabled = expiryDate.Disabled;
                //expiryDateMulti.ReadOnly = expiryDate.ReadOnly;
                //expiryDateDisabled.Text = expiryDate.ReadOnly.ToString();

                //hijriCal.LazyItems.ForEach(x => (x as Field).ReadOnly = expiryDate.ReadOnly || issueDate.ReadOnly);
                if (rwFile.InputType == InputType.Password)
                {
                    var s = GridPanel1.ColumnModel.Columns[GridPanel1.ColumnModel.Columns.Count - 1];
                    s.Renderer.Handler = s.Renderer.Handler.Replace("attachRender()", " ' '");
                }

                if (!_systemService.SessionHelper.GetHijriSupport())
                {
                    SetHijriInputState(false);
                    hijriCal.Visible = false;
                }
            }
        }
Ejemplo n.º 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();
                if ((bool)_systemService.SessionHelper.Get("IsAdmin"))
                {
                    return;
                }
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(AttendanceSchedule), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                }
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(AttendanceScheduleDay), dayBreaksForm, scheduleDays, null, Button3);
                }
                catch (AccessDeniedException exp)
                {
                    dayBreaksForm.Hidden = true;
                }
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(AttendanceBreak), null, periodsGrid, AddBreakButton, null);
                }
                catch (AccessDeniedException exp)
                {
                    periodsGrid.Hidden = true;
                    return;
                }

                //ApplyAccessControlOnBreaks();
            }
        }
Ejemplo n.º 20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();
                //if (string.IsNullOrEmpty(Request.QueryString["employeeId"]))
                //{
                //    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorOperation).Show();
                //    return;
                //}
                //CurrentEmployee.Text = Request.QueryString["employeeId"];
                //if (string.IsNullOrEmpty(Request.QueryString["hireDate"]))
                //{
                //    X.Msg.Alert(Resources.Common.Error, Resources.Common.MissingHireDate).Show();
                //    Viewport11.Hidden = true;
                //    return;
                //}
                //CurrentHireDate.Text = Request.QueryString["hireDate"];
                //EmployeeTerminated.Text = Request.QueryString["terminated"];

                bool disabled = EmployeeTerminated.Text == "1";
                btnAdd.Disabled = SaveEHButton.Disabled = disabled;

                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(EmployeeCal), EditEHForm, employeeCalenderGrid, btnAdd, SaveEHButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    //    employeeCalendarGrid.Hidden = true;
                }
                dayIdDtCO.Format = ecDate.Format = _systemService.SessionHelper.GetDateformat();
                FillCalendars();
                FillSchedules();
                ecDate.ReadOnly   = false;
                ADDNewRecord.Text = "0";
            }
        }
Ejemplo n.º 21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!X.IsAjaxRequest && !IsPostBack)
     {
         SetExtLanguage();
         HideShowButtons();
         HideShowColumns();
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(Model.Company.Structure.Position), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             Viewport1.Hidden = true;
             return;
         }
     }
 }
Ejemplo n.º 22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!X.IsAjaxRequest && !IsPostBack)
     {
         SetExtLanguage();
         HideShowButtons();
         ProcessNotificationStore.Reload();
         fillStore1();
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(ProcessNotification), null, ProcessNotificationGrid, null, SaveButton);
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             Viewport1.Hidden = true;
             return;
         }
     }
 }
Ejemplo n.º 23
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!X.IsAjaxRequest && !IsPostBack)
     {
         SetExtLanguage();
         HideShowButtons();
         HideShowColumns();
         date.Format = _systemService.SessionHelper.GetDateformat();
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(LetterSelfservice), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             Viewport1.Hidden = true;
             return;
         }
     }
 }
Ejemplo n.º 24
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                languageIdStore.DataSource = Common.XMLDictionaryList(_systemService, "23");
                languageIdStore.DataBind();
                this.rtl.Text = _systemService.SessionHelper.CheckIfArabicSession() ? "True" : "False";
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(UserInfo), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(SecurityGroupUser), null, groupsGrid, addToGroupButton, addToGroupButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }

                //userSelector.ButtonsText = new ItemSelectorButtonsText();
                //userSelector.ButtonsText.Add = GetLocalResourceObject("Add").ToString();
                //userSelector.ButtonsText.Remove = GetLocalResourceObject("Remove").ToString();
                //userSelector.Buttons = new ItemSelectorButton[2];
                //userSelector.Buttons[0] = ItemSelectorButton.Add;
                //userSelector.Buttons[1] = ItemSelectorButton.Remove;
            }
        }
Ejemplo n.º 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();
                FillSchedules();
                FillWorkingCalendar();
                releaseDate.Format = expiryDate.Format = releaseDateDF.Format = expiryDateDF.Format = _systemService.SessionHelper.GetDateformat();
                if (!string.IsNullOrEmpty(Request.QueryString["record"]))
                {
                    var p1  = new Ext.Net.Parameter("id", Request.QueryString["record"]);
                    var p2  = new Ext.Net.Parameter("type", "imgEdit");
                    var col = new Ext.Net.ParameterCollection();
                    col.Add(p1);
                    col.Add(p2);
                    PoPuP(null, new DirectEventArgs(col));
                }


                if (_systemService.SessionHelper.CheckIfIsAdmin())
                {
                    return;
                }
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(Branch), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
                    //ApplyAccessControlOnAddress();
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
                address.Text = string.Empty;
            }
        }
Ejemplo n.º 26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(DayType), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }

                colorDisabled.Text = (colorDay.InputType == InputType.Password).ToString();
            }
        }
Ejemplo n.º 27
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!X.IsAjaxRequest && !IsPostBack)
     {
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(Model.System.CompanyOrgChart), null, null, null, null);
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             topBar.Hidden = true;
             return;
         }
         SetExtLanguage();
         HideShowButtons();
         HideShowColumns();
         type.Select(0);
         FillHirarichy(sender, new DirectEventArgs(new Ext.Net.ParameterCollection()));
     }
 }
Ejemplo n.º 28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();
                HideShowButtons();
                HideShowColumns();
                if (_systemService.SessionHelper.CheckIfIsAdmin())
                {
                    return;
                }
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(PayrollIndemnity), BasicInfoTab, GridPanel1, btnAdd, SaveButton);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }
                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(PayrollIndemnityDetails), null, periodsGrid, addPeriod, null);
                }
                catch (AccessDeniedException exp)
                {
                    periodsGrid.Hidden = true;
                }
                if ((bool)_systemService.SessionHelper.Get("IsAdmin"))
                {
                    return;
                }

                //  ApplySecurityOnVacationPeriods();
            }
        }
Ejemplo n.º 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest && !IsPostBack)
            {
                SetExtLanguage();

                StartAt.Text = "0";
                if (!string.IsNullOrEmpty(Request.QueryString["_fromSelfService"]))
                {
                    FromSelfService.Text = Request.QueryString["_fromSelfService"];
                    loaderUrl.Text       = "ReportParameterBrowser.aspx?_reportName=SSAD&values=";
                    Panel8.Loader.Url    = "ReportParameterBrowser.aspx?_reportName=SSAD";

                    vals.Text = "1|" + new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1).ToString("yyyyMMdd") + "^2|" + DateTime.Today.ToString("yyyyMMdd");
                }
                else
                {
                    vals.Text            = "6|" + DateTime.Today.ToString("yyyyMMdd") + "^7|" + DateTime.Today.ToString("yyyyMMdd");
                    FromSelfService.Text = "false";
                }

                format.Text = _systemService.SessionHelper.GetDateformat().ToUpper();

                try
                {
                    AccessControlApplier.ApplyAccessControlOnPage(typeof(AttendanceDay), null, GridPanel1, null, null);
                }
                catch (AccessDeniedException exp)
                {
                    X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
                    X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
                    Viewport1.Hidden = true;
                    return;
                }

                List <XMLDictionary> timeCode = ConstTimeVariationType.TimeCodeList(_systemService);
            }
        }
Ejemplo n.º 30
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!X.IsAjaxRequest && !IsPostBack)
     {
         SetExtLanguage();
         HideShowButtons();
         HideShowColumns();
         modulesCombo1.ADDHandler("change", "App.CurrentModule.setValue(this.value); App.classesStore.reload();");
         accessTypeStore.DataSource = Common.XMLDictionaryList(_systemService, "33");
         accessTypeStore.DataBind();
         try
         {
             AccessControlApplier.ApplyAccessControlOnPage(typeof(CertificateLevel), null, GridPanel1, btnAdd, SaveButton);
         }
         catch (AccessDeniedException exp)
         {
             X.MessageBox.ButtonText.Ok = Resources.Common.Ok;
             X.Msg.Alert(Resources.Common.Error, Resources.Common.ErrorAccessDenied).Show();
             Viewport1.Hidden = true;
             return;
         }
     }
 }