Exemplo n.º 1
0
        public ActionResult PatientForm(int id = 0)
        {
            Patient pat = new Patient();

            if (id > 0)
            {
                // get saved record..
            }

            ViewBag.Gender = new SelectList(CommonBll.Genders, "GenderId", "GenderName", pat.GenderId);
            ViewBag.Titles = CommonBll.Titles;

            ViewBag.Country = new SelectList(CommonBll.Countries, "CountryId", "CountryName", pat.CountryId);

            ViewBag.MaritalStatus = new SelectList(CommonBll.MaritalStatus, "Id", "Value", pat.MaritalStatus);

            ViewBag.Religion = new SelectList(CommonBll.Religion, "Id", "Value", pat.ReligionId);

            ViewBag.Languages = new SelectList(CommonBll.GetLanguages(), "LanguageId", "LanguageName", pat.PreferredLanguage);

            ViewBag.Ethnicities = new SelectList(CommonBll.Ethnicities, "Id", "Value", pat.EthnicGroup);

            return(View(pat));
        }