예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                hdfMenuID.Text        = MenuId.ToString();
                hdfDepartments.Text   = string.Join(",", CurrentUser.Departments.Select(d => d.Id));
                hdfTypeTimeSheet.Text = TypeTimeSheet;

                // load west
                new Core.Framework.Common.BorderLayout()
                {
                    menuID = MenuId,
                    script = "#{hdfDepartmentSelected}.setValue('" + Core.Framework.Common.BorderLayout.nodeID +
                             "');#{txtSearch}.reset();#{PagingToolbar1}.pageIndex = 0; #{PagingToolbar1}.doLoad();"
                }.AddDepartmentList(brlayout, CurrentUser, true);
                //get list timesheetAdjustment
                CheckInitAdjustment();
            }

            if (btnEdit.Visible)
            {
                RowSelectionModel1.Listeners.RowSelect.Handler   += "if(hdfIsLocked.getValue() == 'true' ){btnEdit.disable();}else{btnEdit.enable();}  ";
                RowSelectionModel1.Listeners.RowDeselect.Handler += "btnEdit.disable(); ";
                gridTimeAdjust.DirectEvents.RowDblClick.Event    += btnEdit_Click;
            }

            if (btnDelete.Visible)
            {
                RowSelectionModel1.Listeners.RowSelect.Handler   += "if(hdfIsLocked.getValue() == 'true' ){ btnDelete.disable();} else { btnDelete.enable(); }";
                RowSelectionModel1.Listeners.RowDeselect.Handler += "btnDelete.disable(); ";
            }

            ucChooseEmployee.AfterClickAcceptButton += new EventHandler(ucChooseEmployee_AfterClickAcceptButton);
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!ExtNet.IsAjaxRequest)
            {
                hdfMenuID.Text            = MenuId.ToString();
                hdfDepartments.Text       = string.Join(",", CurrentUser.Departments.Select(d => d.Id));
                hdfSalaryBoardListID.Text = Request.QueryString["id"];
                InitControl();
            }

            if (btnEdit.Visible)
            {
                RowSelectionModel1.Listeners.RowSelect.Handler   += "if(hdfIsLocked.getValue() == 'true' ){btnEdit.disable();}else{btnEdit.enable();}  ";
                RowSelectionModel1.Listeners.RowDeselect.Handler += "btnEdit.disable(); ";
                gridColumnDynamic.DirectEvents.RowDblClick.Event += BtnEdit_Click;
            }

            if (btnDelete.Visible)
            {
                RowSelectionModel1.Listeners.RowSelect.Handler   += "if(hdfIsLocked.getValue() == 'true' ){ btnDelete.disable();} else { btnDelete.enable(); }";
                RowSelectionModel1.Listeners.RowDeselect.Handler += "btnDelete.disable(); ";
            }

            ucChooseEmployee.AfterClickAcceptButton += new EventHandler(ucChooseEmployee_AfterClickAcceptButton);
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                // Set resource
                grpContract.ColumnModel.SetColumnHeader(2, "{0}".FormatWith(Resource.Get("Grid.EmployeeCode")));
                EmployeeGrid.Title = Resource.Get("Employee.List");

                // init department
                storeDepartment.DataSource = CurrentUser.DepartmentsTree;
                storeDepartment.DataBind();

                hdfUserID.Text      = CurrentUser.User.Id.ToString();
                hdfMenuID.Text      = MenuId.ToString();
                hdfDepartments.Text = DepartmentIds;

                // load west
                new Core.Framework.Common.BorderLayout()
                {
                    menuID = MenuId,
                    script = "#{hdfDepartmentSelected}.setValue('" + Core.Framework.Common.BorderLayout.nodeID +
                             "');#{txtSearch}.reset();#{PagingToolbar1}.pageIndex = 0; #{PagingToolbar1}.doLoad();"
                }.AddDepartmentList(brlayout, CurrentUser, false);
            }
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                hdfUserID.Text      = CurrentUser.User.Id.ToString();
                hdfMenuID.Text      = MenuId.ToString();
                hdfDepartments.Text = string.Join(",", CurrentUser.Departments.Select(d => d.Id));
                // load west
                new Core.Framework.Common.BorderLayout()
                {
                    menuID = MenuId,
                    script = "#{hdfDepartmentSelected}.setValue('" + Core.Framework.Common.BorderLayout.nodeID +
                             "');#{txtSearch}.reset();#{PagingToolbar1}.pageIndex = 0; #{PagingToolbar1}.doLoad();"
                }.AddDepartmentList(brlayout, CurrentUser, true);
            }

            if (btnEdit.Visible)
            {
                RowSelectionModel1.Listeners.RowSelect.Handler   += "btnEdit.enable(); ";
                RowSelectionModel1.Listeners.RowDeselect.Handler += "btnEdit.disable(); ";
                grpContract.Listeners.RowDblClick.Handler        +=
                    "if(CheckSelectedRows(grpContract)){btnUpdateHopDong.hide();btnEditHopDong.show();Button20.hide();}";
                grpContract.DirectEvents.RowDblClick.Event += btnEdit_Click;
            }

            if (btnDelete.Visible)
            {
                RowSelectionModel1.Listeners.RowSelect.Handler   += "btnDelete.enable(); ";
                RowSelectionModel1.Listeners.RowDeselect.Handler += "btnDelete.disable(); ";
            }

            ucChooseEmployee.AfterClickAcceptButton += new EventHandler(ucChooseEmployee_AfterClickAcceptButton);
        }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!ExtNet.IsAjaxRequest)
            {
                hdfMenuID.Text        = MenuId.ToString();
                hdfDepartments.Text   = string.Join(",", CurrentUser.Departments.Select(d => d.Id));
                hdfTypeTimeSheet.Text = Constant.TimesheetTypeTimeSheet;
                hdfAdjustTimeSheetHandlerType.Text = Request.QueryString["AdjustType"];
                if (int.TryParse(hdfAdjustTimeSheetHandlerType.Text, out var adjustType))
                {
                    if (adjustType == (int)TimeSheetAdjustmentType.AdjustmentOverTime)
                    {
                        hdfGroupSymbol.Text = Constant.TimesheetOverTime;
                    }
                }
                // init department
                storeDepartment.DataSource = CurrentUser.DepartmentsTree;
                storeDepartment.DataBind();
                dfFromDate.SelectedDate = DateTime.Today;
                dfToDate.SelectedDate   = DateTime.Today;
                hdfGroupWorkShift.Text  = null;
                dfFromDateSearch.SetValue(ConvertUtils.GetStartDayOfMonth());
                dfToDateSearch.SetValue(ConvertUtils.GetLastDayOfMonth());

                // load west
                new Core.Framework.Common.BorderLayout()
                {
                    menuID = MenuId,
                    script = "#{hdfDepartmentSelected}.setValue('" + Core.Framework.Common.BorderLayout.nodeID +
                             "');#{txtSearch}.reset();#{PagingToolbar1}.pageIndex = 0; #{PagingToolbar1}.doLoad();"
                }.AddDepartmentList(brlayout, CurrentUser, false);
                //get list timesheet Adjustment
            }

            if (btnEdit.Visible)
            {
                //RowSelectionModel1.Listeners.RowSelect.Handler += "if(hdfIsLocked.getValue() == 'true' ){btnEdit.disable();}else{btnEdit.enable();}  ";
                //RowSelectionModel1.Listeners.RowDeselect.Handler += "btnEdit.disable(); ";
            }

            if (btnDelete.Visible)
            {
                RowSelectionModel1.Listeners.RowSelect.Handler   += "btnDelete.enable();";
                RowSelectionModel1.Listeners.RowDeselect.Handler += "btnDelete.disable(); ";
            }
        }
예제 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!ExtNet.IsAjaxRequest)
            {
                hdfMenuID.Text            = MenuId.ToString();
                hdfDepartments.Text       = DepartmentIds;
                hdfSalaryBoardListID.Text = Request.QueryString["id"];
                InitControl();
                InitDynamicColumn();
            }

            if (btnEdit.Visible)
            {
                RowSelectionModel1.Listeners.RowSelect.Handler   += "if(hdfIsLocked.getValue() == 'true' ){btnEdit.disable();}else{btnEdit.enable();}  ";
                RowSelectionModel1.Listeners.RowDeselect.Handler += "btnEdit.disable(); ";
            }

            if (btnDelete.Visible)
            {
                RowSelectionModel1.Listeners.RowSelect.Handler   += "if(hdfIsLocked.getValue() == 'true' ){ btnDelete.disable();} else { btnDelete.enable(); }";
                RowSelectionModel1.Listeners.RowDeselect.Handler += "btnDelete.disable(); ";
            }
        }
예제 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!ExtNet.IsAjaxRequest)
            {
                // Set resource
                grp_HoSoNhanSu.ColumnModel.SetColumnHeader(1, "{0}".FormatWith(Resource.Get("Employee.Code")));

                hdfMenuID.Text      = MenuId.ToString();
                hdfMaDonVi.Text     = string.Join(",", CurrentUser.Departments.Select(d => d.Id));
                hdfDepartments.Text = string.Join(",", CurrentUser.Departments.Select(d => d.Id));

                new Core.Framework.Common.BorderLayout()
                {
                    menuID = MenuId,
                    script = "#{hdfSelectedDepartment}.setValue('" + Core.Framework.Common.BorderLayout.nodeID + "');#{PagingToolbar1}.pageIndex = 0;#{DirectMethods}.SetValueQuery();"
                }.AddDepartmentList(brlayout, CurrentUser, true);

                if (btnDelete.Visible)
                {
                    rowSelection.Listeners.RowSelect.Handler += "btnDelete.enable();";
                }

                grp_HoSoNhanSu.StoreID = "store_HoSoNhanSu";
                grp_HoSoNhanSu.Reload();

                #region phân quyền context menu
                mnuAdd.Visible    = btnAddNew.Visible;
                mnuEdit.Visible   = btnEdit.Visible;
                mnuDelete.Visible = btnDelete.Visible;

                #endregion
            }

            CapNhatAnhHangLoat1.AfterClickXemCanBoChuaCoAnhButton += new EventHandler(AfterClickXemCanBoChuaCoAnhButton_AfterClickXemCanBoChuaCoAnhButton);
            CapNhatAnhHangLoat1.AfterClickHideWindow += new EventHandler(AfterClickHideWindow_AfterClickHideWindow);
            CapNhatAnhHangLoat1.AfterClickCapNhat    += new EventHandler(AfterClickCapNhat_AfterClickCapNhat);
        }
예제 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!ExtNet.IsAjaxRequest)
            {
                // Set resource
                grp_HoSoNhanSu.ColumnModel.SetColumnHeader(1, "{0}".FormatWith(Resource.Get("Employee.Code")));
                wdInput.Title = Resource.Get("Employee.WindowUpdateTitle");

                // init control
                //InitControl();

                hdfMenuID.Text      = MenuId.ToString();
                hdfMaDonVi.Text     = string.Join(",", CurrentUser.Departments.Select(d => d.Id));
                hdfDepartments.Text = string.Join(",", CurrentUser.Departments.Select(d => d.Id));

                //txtReportCreator.Text = CurrentUser.User.DisplayName;
                // transfer user id
                //store_HoSoNhanSu.BaseParams.Add(new Parameter("uID", CurrentUser.User.Id.ToString()));
                //store_HoSoNhanSu.BaseParams.Add(new Parameter("mID", MenuID.ToString()));

                new Core.Framework.Common.BorderLayout()
                {
                    menuID = MenuId,
                    script = "#{hdfSelectedDepartment}.setValue('" + Core.Framework.Common.BorderLayout.nodeID + "');#{PagingToolbar1}.pageIndex = 0;#{DirectMethods}.SetValueQuery();"
                }.AddDepartmentList(brlayout, CurrentUser, true);
                //if (CurrentUser.User.Image == "0" || CurrentUser.User.Image == null || CurrentUser.User.Image == "")
                //{
                //    grp_HoSoNhanSu.StoreID = "store_HoSoNhanSu";
                //    grp_HoSoNhanSu.Reload();
                //}
                //else
                //{
                //    hdfRecordId.Text = CurrentUser.User.Image;
                //}
                //SetVisibleByControlID(btnAddNew, btnEdit, btnDelete,btnEditPersonInfo,
                //                      btnBaoCao, btnTienIchHoSo,
                //    //mnuNhanDoiDuLieu, mnuNhapTuExcel,
                //                      mnuCapNhatAnhHangLoat);
                if (btnDelete.Visible)
                {
                    rowSelection.Listeners.RowSelect.Handler += "btnDelete.enable();";
                }

                grp_HoSoNhanSu.StoreID = "store_HoSoNhanSu";
                grp_HoSoNhanSu.Reload();
                //}
                //if (mnuNhanDoiDuLieu.Visible)
                //{
                //    rowSelection.Listeners.RowSelect.Handler += "mnuNhanDoiDuLieu.enable();";
                //}
                #region phân quyền context menu
                mnuAdd.Visible    = btnAddNew.Visible;
                mnuEdit.Visible   = btnEdit.Visible;
                mnuDelete.Visible = btnDelete.Visible;
                //mnuNhanDoi.Visible = mnuNhanDoiDuLieu.Visible;
                //mnuNhapExcel.Visible = mnuNhapTuExcel.Visible;
                #endregion
            }
            if (btnEdit.Visible)
            {
                rowSelection.Listeners.RowSelect.Handler    += "btnEdit.enable();";
                grp_HoSoNhanSu.Listeners.RowDblClick.Handler = "#{hdfEven}.setValue('Edit');wdInput.show();";
                //     grp_HoSoNhanSu.DirectEvents.RowDblClick.Event += new ComponentDirectEvent.DirectEventHandler(btnEdit_Click);
            }
            CapNhatAnhHangLoat1.AfterClickXemCanBoChuaCoAnhButton += new EventHandler(AfterClickXemCanBoChuaCoAnhButton_AfterClickXemCanBoChuaCoAnhButton);
            CapNhatAnhHangLoat1.AfterClickHideWindow += new EventHandler(AfterClickHideWindow_AfterClickHideWindow);
            CapNhatAnhHangLoat1.AfterClickCapNhat    += new EventHandler(AfterClickCapNhat_AfterClickCapNhat);
        }