コード例 #1
0
        public ActionResult Employee(RegisterUserModel model)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    //Insert Employee
                    UserBusinessLogic.CreateEmployee(model.Nama, model.TempatLahir, model.TanggalLahir, model.NoTelpon, model.Email, model.Jabatan);

                    //Insert User
                    UserBusinessLogic.CreateUser(model.Username, model.Password, model.IdRole);
                }
                catch (System.Exception ex)
                {

                    ModelState.AddModelError("", ex.Message);
                }
            }

            return View(model);
        }