示例#1
0
        public async Task <IActionResult> Edit(int id, [Bind("SurgicalHistoryId,SurgeryProcedure,DateOfSurgeryProcedure,MedProviderId,MedCareLocationId,ProblemWithAnesthesia,AnesthesiaProblemExplanation")] SurgicalHistory surgicalHistory)
        {
            if (id != surgicalHistory.SurgicalHistoryId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(surgicalHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SurgicalHistoryExists(surgicalHistory.SurgicalHistoryId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(surgicalHistory));
        }
示例#2
0
        public async Task <IActionResult> Create([Bind("SurgicalHistoryId,SurgeryProcedure,DateOfSurgeryProcedure,MedProviderId,MedCareLocationId,ProblemWithAnesthesia,AnesthesiaProblemExplanation")] SurgicalHistory surgicalHistory)
        {
            if (ModelState.IsValid)
            {
                _context.Add(surgicalHistory);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(surgicalHistory));
        }
        public async Task <IActionResult> Create([Bind("SurgeryHistoryId,SurgeryProcedure,DateOfSurgeryProcedure,MedProviderId,MedCareLocationId,ProblemWithAnesthesia,AnesthesiaProblemExplanation")] SurgicalHistory surgicalHistory)
        {
            if (ModelState.IsValid)
            {
                _context.Add(surgicalHistory);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["MedCareLocationId"] = new SelectList(_context.MedCareLocation, "LocationId", "LocationCity", surgicalHistory.MedCareLocationId);
            ViewData["MedProviderId"]     = new SelectList(_context.MedicalProvider, "MedProviderId", "ActiveOrInactive", surgicalHistory.MedProviderId);
            return(View(surgicalHistory));
        }
示例#4
0
        protected void BuildSurgicalHistory()
        {
            if (patientID != 0)
            {
                ChronoDa da = new ChronoDa();
                DataSet  ds = da.GetChronoList(this.patientID, "Procedures", Context.User.Identity.Name);

                if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    SurgicalHistory.DataSource = ds.Tables[0].DefaultView;
                    SurgicalHistory.DataBind();

                    if (ds.Tables[0].Rows.Count > 3)
                    {
                        SurgicalHistoryCell1.RowSpan = 5;
//						SurgicalHistoryCell1.Attributes["class"] = "FormInnerRowRightBorder";
                        SurgicalHistoryCell2.Visible = false;
                        SurgicalHistoryCell3.Visible = false;
                        SurgicalHistoryCell4.Visible = false;
                        SurgicalHistoryCell5.Visible = false;
                    }
                }
            }
        }