Beispiel #1
0
        public IActionResult addEmp()
        {
            EmployeeModels emp = new EmployeeModels();

            emp.insertEmp();
            string str = emp.turnId;

            return(RedirectToAction("emp", new { ID = str }));
        }
Beispiel #2
0
        public IActionResult insertEmp(string prefix_th, string name_th, string name_en, string status, string type, string start, string last_th, string last_en, string prefix_en, string position, string company, string section, string department)
        {
            CultureInfo en = new CultureInfo("EN");

            EmployeeModels emp = new EmployeeModels();

            emp.emp_prefix_th   = prefix_th;
            emp.emp_name_th     = name_th;
            emp.emp_name_en     = name_en;
            emp.emp_status      = status;
            emp.emp_type        = type;
            emp.emp_start_date  = start;
            emp.emp_lastname_th = last_th;
            emp.emp_lastname_en = last_en;
            emp.emp_prefix_en   = prefix_en;

            emp.insertEmp();

            return(RedirectToAction("employee", new { code = emp.emp_id }));
        }