Esempio n. 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);
            }
        }
Esempio n. 2
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);
            }
        }
Esempio n. 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);
      }
  }
Esempio n. 4
0
 void btnNew_Click(object sender, RoutedEventArgs e)
 {
     LeftOfficeForm form = new LeftOfficeForm(FormTypes.New, "");
     EntityBrowser browser = new EntityBrowser(form);
     form.MinHeight = 350;
     browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
     browser.Show<string>(DialogMode.Default, SMT.SAAS.Main.CurrentContext.Common.ParentLayoutRoot, "", (result) => { });
 }