public IActionResult InsertProfile(string gender, string age, string nationality, string race, string religion, string blood, string birthday, string identification, string date_issue, string expired_date, string weigth, string height, string marital, string child, string emp_id) { emp_profileModel profile = new emp_profileModel(); profile.profile_gender = gender; profile.profile_age = age; profile.profile_nationality = nationality; profile.profile_race = race; profile.profile_religion = religion; profile.profile_blood = blood; profile.profile_birthday = birthday; profile.profile_identification = identification; profile.profile_date_issue = date_issue; profile.profile_expired_date = expired_date; profile.profile_weight = weigth; profile.profile_height = height; profile.profile_marital_status = marital; profile.profile_child_num = child; profile.profile_emp_id = emp_id; profile.insert_profile(); return(RedirectToAction("employee", "Employee", new { code = emp_id })); }
public void emp_profile(string emp) { emp_profileModel profile = new emp_profileModel(); if (profile.check_profile(emp) != "0") { profile.select_profile(emp); ViewData["gender"] = profile.profile_gender; ViewData["age"] = profile.profile_age; ViewData["nationality"] = profile.profile_nationality; ViewData["race"] = profile.profile_race; ViewData["religion"] = profile.profile_religion; ViewData["blood"] = profile.profile_blood; ViewData["birthday"] = profile.profile_birthday; ViewData["identification"] = profile.profile_identification; ViewData["date_issue"] = profile.profile_date_issue; ViewData["expired_date"] = profile.profile_expired_date; ViewData["weigth"] = profile.profile_weight; ViewData["height"] = profile.profile_height; if (profile.profile_marital_status == "single") { ViewData["marital"] = "โสด"; } else if (profile.profile_marital_status == "marry") { ViewData["marital"] = "สมรส"; } else if (profile.profile_marital_status == "divorce") { ViewData["marital"] = "หยย่า"; } else if (profile.profile_marital_status == "separate") { ViewData["marital"] = "แยกกันอยู่"; } ViewData["child"] = profile.profile_child_num; } }
public string selectProfile(string emp) { emp_profileModel profile = new emp_profileModel(); return(profile.select_profile(emp)); }