コード例 #1
0
        public async Task <IActionResult> AddOrEditLawyerQualification(LawyerQualification lawyerQualification)
        {
            if (ModelState.IsValid)
            {
                if (lawyerQualification.LawyerQualificationId != 0)
                {
                    await _lawyerService.EditLawyerQualification(lawyerQualification);

                    return(RedirectToAction("EditLawyer", "Lawyer", new { @id = lawyerQualification.LawyerId }));
                }
                else
                {
                    await _lawyerService.AddLawyerQualification(lawyerQualification);

                    return(RedirectToAction("EditLawyer", "Lawyer", new { @id = lawyerQualification.LawyerId }));
                }
            }
            return(View());
        }