コード例 #1
0
ファイル: SysFBAdmins.xaml.cs プロジェクト: jjg0519/OA
 private void btnDel_Click(object sender, RoutedEventArgs e)
 {
     if (SelectedEmployee != null)
     {
         if (this.DtGrid.SelectedItems != null)
         {
             SMT.Saas.Tools.PersonnelWS.V_EMPLOYEEVIEW employee = DtGrid.SelectedItem as SMT.Saas.Tools.PersonnelWS.V_EMPLOYEEVIEW;
             //var Ents = from ent in LstFbAdmin
             //           where ent.OWNERCOMPANYID == employee.OWNERCOMPANYID && ent.OWNERPOSTID == employee.OWNERPOSTID
             //           && ent.OWNERDEPARTMENTID == employee.OWNERDEPARTMENTID
             //           && ent.EMPLOYEEID == employee.EMPLOYEEID
             //           select ent;
             //if (Ents != null)
             //{
             //    if (Ents.Count() > 0)
             //    {
             //        //if(Ents.FirstOrDefault().)
             //    }
             //}
             if (DtGrid.SelectedItems.Count > 1)
             {
                 ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), "只能删除单条记录,请重新选择!", Utility.GetResourceStr("CONFIRMBUTTON"));
             }
             else
             {
                 if (employee != null)
                 {
                     strSelectEmployeeID = employee.EMPLOYEEID;
                     permclient.DeleteFbAdminAsync(employee.EMPLOYEEID, employee.OWNERCOMPANYID);
                 }
             }
         }
     }
     else
     {
         ComfirmWindow.ConfirmationBox(Utility.GetResourceStr("CONFIRMINFO"), "请选择需要删除的信息", Utility.GetResourceStr("CONFIRMBUTTON"));
     }
 }