Ejemplo n.º 1
0
        public async Task <ActionResult> AddDisease(DataModel model)
        {
            try
            {
                // Prepare data
                int result = 0;
                model.IsPostBack = true;
                model.IsActive   = true;

                // Return list of dictionary words
                using (LinqDBDataContext data = new LinqDBDataContext())
                {
                    result = await model.AddDiseaseAsync(model.DiseaseName, model.SelectedSpecialities);
                }

                // Return result
                TempData[Constants.ProcessInsertData] = result;
                return(RedirectToAction(Constants.DisplayServiceAction, Constants.DataController, model));
            }
            catch (Exception exception)
            {
                LoggingUtil.LogException(exception);
                return(RedirectToAction(Constants.SystemFailureHomeAction, Constants.ErrorController));
            }
        }