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

                int result = _eventDetailBL.InsertEvent(obj);
                // BindDropdown(ref obj);
                ViewBag.Saved = true;

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