Exemple #1
0
        void btnReSubmit_Click(object sender, RoutedEventArgs e)
        {
            if (DtGrid.SelectedItems.Count > 0)
            {
                V_LEFTOFFICEVIEW temp = DtGrid.SelectedItems[0] as V_LEFTOFFICEVIEW;
                //审核通过的不能重新提交,因为重新提交不能改变员工离职状态,所以这里还是可以禁用,
                //要让员工状态改变,可以在员工入职那重新提交
                if (temp.CHECKSTATE == Convert.ToInt32(CheckStates.Approved).ToString())
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("REPEATAUDITERROR"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);

                    return;
                }
                LeftOfficeForm form    = new LeftOfficeForm(FormTypes.Resubmit, temp.DIMISSIONID);
                EntityBrowser  browser = new EntityBrowser(form);
                browser.FormType         = FormTypes.Resubmit;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);

                browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                //ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "ReSubmit"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            }
        }
Exemple #2
0
        void btnCreate_Click(object sender, RoutedEventArgs e)
        {
            if (DtGrid.SelectedItems.Count > 0)
            {
                // T_HR_LEFTOFFICE temp = DtGrid.SelectedItems[0] as T_HR_LEFTOFFICE;
                V_LEFTOFFICEVIEW tempview = DtGrid.SelectedItems[0] as V_LEFTOFFICEVIEW;

                T_HR_LEFTOFFICE temp = new T_HR_LEFTOFFICE();
                temp.DIMISSIONID                 = tempview.DIMISSIONID;
                temp.CREATEUSERID                = tempview.CREATEUSERID;
                temp.CHECKSTATE                  = tempview.CHECKSTATE;
                temp.OWNERCOMPANYID              = tempview.OWNERCOMPANYID;
                temp.OWNERDEPARTMENTID           = tempview.OWNERDEPARTMENTID;
                temp.OWNERPOSTID                 = tempview.OWNERPOSTID;
                temp.OWNERID                     = tempview.EMPLOYEEID;
                temp.T_HR_EMPLOYEE               = new T_HR_EMPLOYEE();
                temp.T_HR_EMPLOYEE.EMPLOYEEID    = tempview.EMPLOYEEID;
                temp.T_HR_EMPLOYEE.EMPLOYEECNAME = tempview.EMPLOYEECNAME;
                temp.APPLYDATE                   = tempview.APPLYDATE;
                temp.LEFTOFFICEDATE              = tempview.LEFTOFFICEDATE;
                temp.LEFTOFFICECATEGORY          = tempview.LEFTOFFICECATEGORY;
                temp.LEFTOFFICEREASON            = tempview.LEFTOFFICEREASON;
                temp.REMARK            = tempview.REMARK;
                temp.T_HR_EMPLOYEEPOST = new T_HR_EMPLOYEEPOST();
                temp.T_HR_EMPLOYEEPOST.EMPLOYEEPOSTID = tempview.EMPLOYEEPOSTID;
                if (temp.CHECKSTATE == Convert.ToInt32(CheckStates.Approved).ToString())
                {
                    LeftOfficeConfirmForm form    = new LeftOfficeConfirmForm(FormTypes.New, temp);
                    EntityBrowser         browser = new EntityBrowser(form);
                    browser.FormType = FormTypes.New;
                    // form.MinHeight = 350;
                    browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                    browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
                }
                else
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("离职单未审核通过"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                }
            }
            else
            {
                //ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            }
        }
Exemple #3
0
 void btnAudit_Click(object sender, RoutedEventArgs e)
 {
     if (DtGrid.SelectedItems.Count > 0)
     {
         V_LEFTOFFICEVIEW temp    = DtGrid.SelectedItems[0] as V_LEFTOFFICEVIEW;
         LeftOfficeForm   form    = new LeftOfficeForm(FormTypes.Audit, temp.DIMISSIONID);
         EntityBrowser    browser = new EntityBrowser(form);
         browser.FormType         = FormTypes.Audit;
         browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
         browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
     }
     else
     {
         //ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON"));
         ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "AUDIT"),
                                        Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
     }
 }
Exemple #4
0
        void btnEdit_Click(object sender, RoutedEventArgs e)
        {
            //string OwnerCompanyIDs = "";
            //string OwnerDepartmentIDs = "";
            //string OwnerPositionIDs = "";
            //PermissionServiceClient PermClient = new PermissionServiceClient();
            //PermClient.GetUserByEmployeeIDAsync(SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID);
            //PermClient.GetUserByEmployeeIDCompleted += new EventHandler<GetUserByEmployeeIDCompletedEventArgs>(PermClient_GetUserByEmployeeIDCompleted);   // PermClient.GetUserByEmployeeID(employeeID);

            //int i = PermissionHelper.GetPermissionValue("T_HR_LEFTOFFICECONFIRM", Permissions.Browse);
            //ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), i.ToString(), Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            if (DtGrid.SelectedItems.Count > 0)
            {
                V_LEFTOFFICEVIEW temp = DtGrid.SelectedItems[0] as V_LEFTOFFICEVIEW;
                if (temp.CHECKSTATE != Convert.ToInt32(CheckStates.UnSubmit).ToString())
                {
                    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("NOTONLYCANMODIFYTHEDATASUBMITTED"),
                                                   Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);

                    return;
                }
                //if (!SMT.SaaS.FrameworkUI.Common.Utility.ToolBarButtonOperationPermission(temp, "T_HR_LEFTOFFICE", SMT.SaaS.FrameworkUI.OperationType.Edit, SMT.SAAS.Main.CurrentContext.Common.CurrentLoginUserInfo.EmployeeID))
                //{
                //    ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CAUTION"), Utility.GetResourceStr("NOEDITPERMISSION"),
                //  Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
                //    return;
                //}
                LeftOfficeForm form    = new LeftOfficeForm(FormTypes.Edit, temp.DIMISSIONID);
                EntityBrowser  browser = new EntityBrowser(form);
                browser.FormType         = FormTypes.Edit;
                form.MinHeight           = 350;
                browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                browser.Show <string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
            }
            else
            {
                //ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTDATAALERT"), Utility.GetResourceStr("CONFIRMBUTTON"));
                ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("CONFIRMINFO"), Utility.GetResourceStr("SELECTERROR", "EDIT"),
                                               Utility.GetResourceStr("CONFIRM"), MessageIcon.Exclamation);
            }
        }
Exemple #5
0
        private void DtGrid_LoadingRow(object sender, DataGridRowEventArgs e)
        {
            SetRowLogo(DtGrid, e.Row, "T_HR_LEFTOFFICE");
            V_LEFTOFFICEVIEW view = e.Row.DataContext as V_LEFTOFFICEVIEW;
            //ImageButton ReportButton = DtGrid.Columns[6].GetCellContent(e.Row).FindName("ReportBtn") as ImageButton;
            Button ReportButton = DtGrid.Columns[8].GetCellContent(e.Row).FindName("ReportBtn") as Button;

            //判断登录用户是否有离职确认的查看权限
            if (!ViewLeaveOfficeConfirm)
            {
                ReportButton.Visibility = System.Windows.Visibility.Collapsed;
            }
            ReportButton.IsEnabled = false;
            int ISCONFIRMED = Convert.ToInt32(view.ISCONFIRMED);

            if (ISCONFIRMED < 0)
            {
                ReportButton.Content   = "未确认";
                ReportButton.IsEnabled = true;
            }
            else if (ISCONFIRMED >= 0 && ISCONFIRMED < 2)
            {
                ReportButton.Content   = "确认中";
                ReportButton.IsEnabled = false;
            }
            else if (ISCONFIRMED == 2)
            {
                ISCONFIRMED            = 3;
                ReportButton.Content   = "已确认";
                ReportButton.IsEnabled = false;
            }
            else if (ISCONFIRMED == 3)//by luojie
            {
                ReportButton.Content   = "确认未通过";
                ReportButton.IsEnabled = false;
            }
        }