public void parameterNegative_Test() { var _SearchEmployees = new BLEmployees(); DTOResult <List <DTOEmployees> > resultExpected = new DTOResult <List <DTOEmployees> >(); int _id = -1; var result = _SearchEmployees.SearchEmployeeId(_id); }
protected void Application_Start() { AreaRegistration.RegisterAllAreas(); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); BundleConfig.RegisterBundles(BundleTable.Bundles); //start chat IBLEmployees ibl = new BLEmployees(new DALEmployeesEF()); ibl.InitChat(); }
private void tsbDelete_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e) { try { string Username = GridListUser.GetFocusedRowCellValue("Username").ToString(); BLEmployees.DeleteEmployee(Username); } catch (Exception) { MessageBox.Show("Chọn đúng dùm cái!"); } LoadGrid(); GridListUser.FocusRowHandle(GridListUser.ReturnVisibleRowCount - 1); }
public static void RegisterTypes(UnityContainer container) { //register the concrete implementation for interfaces container.RegisterType <IDALEmployees, DALEmployeesMock>(); container.RegisterType <IBLEmployees, BLEmployees>(); //register a singleton for DAL DALEmployeesMock dalEmployeesMock = new DALEmployeesMock(); container.RegisterInstance(dalEmployeesMock); //register a singleton for BL BLEmployees blEmployees = new BLEmployees(container.Resolve <IDALEmployees>()); container.RegisterInstance(blEmployees); }
public HttpResponseMessage SearchEmployees() { DTOResult <List <DTOEmployees> > resultAPIEmployees = new DTOResult <List <DTOEmployees> >(); try { resultAPIEmployees = new BLEmployees().SearchEmployees(); return(Request.CreateResponse(HttpStatusCode.OK, resultAPIEmployees)); } catch (Exception ex) { resultAPIEmployees.Message = ex.Message.ToString(); resultAPIEmployees.Result = false; return(Request.CreateResponse(HttpStatusCode.InternalServerError, resultAPIEmployees)); } }
public void LoadGrid() //Get the employees list. { DataTable dt = BLEmployees.LoadEmployees(); GridListUser.ItemsSource = dt; }