Exemplo n.º 1
0
        internal void DeleteEmployeeType(int employeeTypeId)
        {
            EmployeeType emplT = null;

            foreach (var item in GetEmployeeTypes())
            {
                if (employeeTypeId == item.Id)
                {
                    emplT = item;
                }
            }
            GetEmployeeTypes().Remove(emplT);
        }
Exemplo n.º 2
0
 internal void UpdateEmployeeType(EmployeeType employeeType)
 {
     var dbEmployeeType = FindEmployeeType(employeeType.Id);
     dbEmployeeType.Name = employeeType.Name;
 }
Exemplo n.º 3
0
 internal void AddEmployeeType(EmployeeType employeeType)
 {
     employeeType.Id = ID++;
     GetEmployeeTypes().Add(employeeType);
 }
Exemplo n.º 4
0
 internal void AddEmployeeType(EmployeeType employeeType)
 {
     employeeType.Id = ID++;
     GetEmployeeTypes().Add(employeeType);
 }
Exemplo n.º 5
0
        internal void UpdateEmployeeType(EmployeeType employeeType)
        {
            var dbEmployeeType = FindEmployeeType(employeeType.Id);

            dbEmployeeType.Name = employeeType.Name;
        }
Exemplo n.º 6
0
 public ActionResult Edit(EmployeeType employeeType)
 {
     ///Update employee
     EmployeeTypeDB.GetInstance().UpdateEmployeeType(employeeType);
     return Redirect("Index");
 }
Exemplo n.º 7
0
 public ActionResult Create(EmployeeType employeeType)
 {
     EmployeeTypeDB.GetInstance().AddEmployeeType(employeeType);
     return Redirect("Index");
 }