/// <summary>
 /// 新增
 /// </summary>
 private void btnNew_Click(object sender, RoutedEventArgs e)
 {
     EmployeeSurveyDistributeChildWindow form = new EmployeeSurveyDistributeChildWindow(FormTypes.New,"");
     EntityBrowser browser = new EntityBrowser(form);
     browser.MinHeight = 510;
     browser.MinWidth = 650;
     browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
     browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
 }
 /// <summary>
 /// 审核
 /// </summary>
 void btnAudit_Click(object sender, RoutedEventArgs e)
 {
     if (IsSelect("AUDIT"))
     {
         T_OA_REQUIREDISTRIBUTE ent = dgDistribute.SelectedItems[0] as T_OA_REQUIREDISTRIBUTE;
         if (ent.CHECKSTATE == ((int)CheckStates.Approving).ToString() ||
             ent.CHECKSTATE == ((int)CheckStates.WaittingApproval).ToString() ||
             ent.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString())
         {
             EmployeeSurveyDistributeChildWindow form = new EmployeeSurveyDistributeChildWindow(FormTypes.Audit, ent.REQUIREDISTRIBUTEID);
             EntityBrowser browser = new EntityBrowser(form);
             browser.FormType = FormTypes.Audit;
             browser.MinHeight = 510;
             browser.MinWidth = 650;
             browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
             browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
         }
         else
         {
             ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("SELECTRECORDNOTOPERATEPLEASEAGAIN"),
                 Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
         }
     }
 }
 /// <summary>
 /// 重新提交
 /// </summary>
 void btnReSubmit_Click(object sender, RoutedEventArgs e)
 {
     if (IsSelect("ReSubmit"))
     {
         ObservableCollection<T_OA_REQUIREDISTRIBUTE> selectItems = GetSelectList();
         if (selectItems != null&&selectItems.Count()>0)
         {
             EmployeeSurveyDistributeChildWindow form = new EmployeeSurveyDistributeChildWindow(FormTypes.Resubmit, selectItems.FirstOrDefault().REQUIREDISTRIBUTEID);
             EntityBrowser browser = new EntityBrowser(form);
             browser.FormType = FormTypes.Resubmit;
             browser.MinHeight = 510;
             browser.MinWidth = 650;
             browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
             browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
         }
     }
 }
 /// <summary>
 /// 修改
 /// </summary>
 private void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (IsSelect("EDIT"))
     {
         ObservableCollection<T_OA_REQUIREDISTRIBUTE> selectItems = GetSelectList();
         if (selectItems != null && selectItems.Count() > 0)
         {
             requiredistributeInfo = selectItems[0];
             if (requiredistributeInfo.CHECKSTATE == ((int)CheckStates.UnSubmit).ToString() || requiredistributeInfo.CHECKSTATE == ((int)CheckStates.UnApproved).ToString())
             {
                 EmployeeSurveyDistributeChildWindow form = new EmployeeSurveyDistributeChildWindow(FormTypes.Edit, selectItems.FirstOrDefault().REQUIREDISTRIBUTEID);
                 EntityBrowser browser = new EntityBrowser(form);
                 browser.FormType = FormTypes.Edit;
                 browser.MinHeight = 510;
                 browser.MinWidth = 650;
                 browser.ReloadDataEvent += new EntityBrowser.refreshGridView(browser_ReloadDataEvent);
                 browser.Show<string>(DialogMode.Default, Common.ParentLayoutRoot, "", (result) => { }, true);
             }
             else
             {
                 ComfirmWindow.ConfirmationBoxs(Utility.GetResourceStr("ERROR"), Utility.GetResourceStr("NOTONLYCANMODIFYTHEDATASUBMITTED"), Utility.GetResourceStr("CONFIRM"), MessageIcon.Error);
             }
         }
     }
 }