public DatabaseFacade() { PatientsDAO = new PatientsDAO(); DictionaryDAO = new DictionaryDAO(); EmployeesDAO = new EmployeesDAO(); UserDAO = new UserDAO(); OrderDAO = new OrdersDAO(); ProfilesDAO = new ProfilesDAO(); StudiesDAO = new StudiesDAO(); SamplesDAO = new SamplesDAO(); TestsDAO = new TestsDAO(); VerificationsDAO = new VerificationsDAO(); ResultsDAO = new ResultsDAO(); ResultUnitsDAO = new ResultUnitsDAO(); SessionsDAO = new SessionsDAO(); }
public void TestDeleteEmployees() { Employees employees = new Employees("Иванов", "Иван", "Иванович", new DateTime(129078), 12, 12, "кондуктор "); int id = new EmployeesDAO().AddEmployees(employees); bool reality = new EmployeesDAO().DeleteEmployees(id); Assert.Equals(true, reality); }
static void Main(string[] args) { // Insert Employee e = new Employee(); e.Id = "E006"; e.Name = "Nhin Lee"; e.BirthDate = new DateTime(1999, 2, 25); e.Position = "Manager"; e.Salary = 123123; EmployeesDAO.Instance().Insert(e); // Get All List <Employee> employees = EmployeesDAO.Instance().GetAll(); foreach (Employee employee in employees) { Console.WriteLine(employee); } }
private void btnExtrae_ClickBefore(object sboObject, SAPbouiCOM.SBOItemEventArg pVal, out bool BubbleEvent) { BubbleEvent = true; mListObjLogin = new List <LoginDTO>(); if (btnExtrae.Caption == "Nueva Captura") { NewSearch(); return; } if (btnExtrae.Caption == "Buscar Nómina") { bool Result = Check_txts(); if (Result) { Enabled_txt(false, "btnCarga"); Enabled_btn(true, "btnCarga"); string lStrYear = txtYear.Value; string lStrPeriod = cmbPeriod.Value; string lStrNo = txtNo.Value; try { this.UIAPIRawForm.Freeze(true); LoginDTO lObjLogin = GetSetupLogin().FirstOrDefault(x => x.Code == int.Parse(cmbPeriod.Value)); if (lObjLogin != null) { Application.SBO_Application.StatusBar.SetText("Buscando información... Porfavor espere", SAPbouiCOM.BoMessageTime.bmt_Long, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); List <int> lLstEmpId = new List <int>(); EmployeesDAO lObjEmp = new EmployeesDAO(); btnExtrae.Caption = "Nueva Captura"; List <Nomina> lLstNomina = new List <Nomina>(); AccountsDAO lObjAccount = new AccountsDAO(); gLstNomina = new List <Nomina>(); gLstNomina = lObjAccount.GetAccounts(lStrYear, lStrPeriod, lStrNo, lObjLogin.NameServer, lObjLogin.NameDB, lObjLogin.Login, lObjLogin.Password); //lObjEmpItem if (gLstNomina.Count > 0) { lLstNomina.AddRange(gLstNomina); } else { Application.SBO_Application.StatusBar.SetText("Sin registros para mostrar", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); } ConvertListIntoDataTable(lLstNomina); Grid0.DataTable = this.UIAPIRawForm.DataSources.DataTables.Item("DT_0"); Grid0.AutoResizeColumns(); } else { Application.SBO_Application.StatusBar.SetText("No se puedo establecer la conexión con el Servidor de Nómina", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); } } catch (Exception ex) { Application.SBO_Application.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); } finally { this.UIAPIRawForm.Freeze(false); } } else { Application.SBO_Application.StatusBar.SetText("No hay datos capturados para extraer. Favor de primero capturar datos", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning); } } }
public EmployeesService() { mObjEmployeesTableDAO = new TableDAO <Employees>(); mObjEmployeesDAO = new EmployeesDAO(); }