public ActionResult DeleteEmp(string EmpID) { ThesisGamingStore.Models.EMPLOYEE employee = db.EMPLOYEE.Find(EmpID); if (employee == null) { return(HttpNotFound()); } return(View(employee)); }
public ActionResult Edit(string EmpID) { ThesisGamingStore.Models.EMPLOYEE employee = db.EMPLOYEE.Find(EmpID); var result = Mapper.ToDto2(employee); if (employee == null) { return(HttpNotFound()); } return(View(result)); }
public static EmployeeEntity ToDto(ThesisGamingStore.Models.EMPLOYEE entity) { return(new EmployeeEntity { EmpID = entity.EmpID, PosID = entity.PosID, Idcard = entity.Idcard, Email = entity.Email, Fname = entity.Fname, Lname = entity.Lname, Address = entity.Address, Sex = entity.Sex, Salary = entity.Salary, UserName = entity.Username, Password = entity.Password, }); }