Exemple #1
0
        public ActionResult EditEvent(EventModel obj)
        {
            @ViewBag.Style = "alert alert-success";
            if (ModelState.IsValid)
            {
                obj.ModifiedBy    = LoginUserID;
                obj.EventDateFrom = Convert.ToDateTime(obj.EventDateFromFormated);
                obj.EventDateTo   = Convert.ToDateTime(obj.EventDateToFormated);

                //string Name = Convert.ToString(TempData["Name"]).Trim();
                //DateTime DateofBirth = Convert.ToDateTime(TempData["DateofBirth"]);

                //TempData.Keep("Name");
                //TempData.Keep("DateofBirth");


                int result = _eventDetailBL.UpdateEvent(obj);

                ViewBag.Saved = true;

                if (result == 1)
                {
                    ViewBag.Style   = "alert alert-success";
                    ViewBag.Message = "जानकारी डेटाबेस मे दर्ज हो गया है | धन्यवाद् ";
                }
                else
                {
                    ViewBag.Style   = "alert alert-danger";
                    ViewBag.Message = "तकनिकी खराबी की वजह से आपका सन्देश नहीं मिला , कृपया दुबारा भेजे.  ";
                }
            }
            return(View(obj));
        }