public async Task <ActionResult> Create([Bind(Include = "EmployeeKey,ParentEmployeeKey,FirstName,LastName,MiddleName,Title,HireDate,BirthDate,EmailAddress,Phone,MaritalStatus,EmergencyContactName,EmergencyContactPhone,SalariedFlag,Gender,PayFrequency,BaseRate,VacationHours,CurrentFlag,SalesPersonFlag,DepartmentName,StartDate,EndDate,Status,ImageUrl,ProfileUrl,ETLLoadID,LoadDate,UpdateDate")] DimEmployee dimEmployee) { if (ModelState.IsValid) { DimEmployee respuesta = await DimEmployeesClient.CreateAsync(dimEmployee); if (respuesta != null) { return(RedirectToAction("Index")); } } //ViewBag.ParentEmployeeKey = new SelectList(db.DimEmployee, "EmployeeKey", "FirstName", dimEmployee.ParentEmployeeKey); return(View(dimEmployee)); }
public async Task <ActionResult> Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var dimEmployee = await DimEmployeesClient.GetAsync(id.Value); if (dimEmployee == null) { return(HttpNotFound()); } return(View(dimEmployee)); }
public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } else { var dimEmployee = await DimEmployeesClient.GetAsync(id.Value); if (dimEmployee == null) { return(HttpNotFound()); } //ViewBag.ParentEmployeeKey = // new SelectList(db.DimEmployee, "EmployeeKey", "FirstName", dimEmployee.ParentEmployeeKey); return(View(dimEmployee)); } }
public async Task <ActionResult> Index() { List <DimEmployee> resp = await DimEmployeesClient.GetAllAsync(); return(View(resp)); }
public async Task <ActionResult> DeleteConfirmed(int id) { var dimEmployee = await DimEmployeesClient.DeleteAsync(id); return(RedirectToAction("Index")); }