Exemplo n.º 1
0
        protected void ucIList_InstanceRowDeleting(object sender, InstanceRowDeletingEventArgs e)
        {
            using (IUnitOfWork uow = UnitOfWorkFactory.Instance.Start(DataStoreResolver.CRMDataStoreKey))
            {
                EmployeeFacade facade = new EmployeeFacade(uow);
                IFacadeUpdateResult <EmployeeData> result = facade.DeleteEmployee(e.Instance.Id);
                e.IsSuccessful = result.IsSuccessful;

                if (result.IsSuccessful)
                {
                    // Refresh whole list
                    RetrieveInstances(facade);
                }
                else
                {
                    // Deal with Update result
                    ProcUpdateResult(result.ValidationResult, result.Exception);
                }
            }
        }
Exemplo n.º 2
0
 public Core.Model.mdlResultSvc DeleteEmployee(Core.Model.mdlEmployeeParam param)
 {
     return(EmployeeFacade.DeleteEmployee(param.EmployeeID));
 }