Esempio n. 1
0
        // GET: MeetingAttendances/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DataTable dt = new System.Data.DataTable();

            dt = MediaInquiries.GetMediaInquiriesById(id);
            MediaInquiries mediaInquiries = ConvertDT2MediaInq(dt);

            return(View(mediaInquiries));
        }
Esempio n. 2
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }


            var Reporters = db.Reporters.ToList();

            //var objReporter = new SelectList(Reporters, "ReportID", "ReporterName");
            ViewBag.Reporters = Reporters;

            var InquirySources = db.InquirySources.ToList();

            // var objInquirySources = new SelectList(InquirySources, "InquirySourceId", "InquirySourceName");
            ViewBag.InquirySources = InquirySources;


            ViewBag.InquiryType = db.TypeRequests.ToList();
            ViewBag.Bureaus     = db.BureausDS.ToList();
            ViewBag.Category    = db.Categories.ToList();

            //MediaInquiries obj = new MediaInquiries();
            //obj.Date = System.DateTime.Now;
            //obj.IsEmail = 0;
            //return View(obj);

            DataTable dt = new System.Data.DataTable();

            dt = MediaInquiries.GetMediaInquiriesById(id);

            //Get rest of the Inquiry details-selected inquiries source, GetReporter
            DataTable DT_mediaInquiryDetails = new System.Data.DataTable();

            if (id != null)
            {
                DT_mediaInquiryDetails = MediaInquiries.GetMediaInquiriesByInqId(id);
            }

            List <MediaInquiryDetail> mediaInquiryDetails = ConvertDT2InqDetails(DT_mediaInquiryDetails);
            MediaInquiries            mediaInquiries      = ConvertDT2MediaInq(dt);

            ViewBag.mediaInquiryDetails = mediaInquiryDetails;
            return(View(mediaInquiries));
        }