示例#1
0
        public ActionResult Edit(EventCategoryModel Model)
        {
            UserId = USession.User_Id;
            try
            {
                tblEventcategory TCtable = Connection.tblEventcategories.SingleOrDefault(x => x.EventCategoryId == Model.EventCategoryId);

                Connection.GDModifyEventCategory(Model.EventCategoryDesc, Model.EventCategoryId, UserId, Model.BroadcastMessage, Model.ParentApprovalNeeded);
                Connection.SaveChanges();

                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                Errorlog.ErrorManager.LogError(ex);
                return(View());
            }
        }
示例#2
0
        public ActionResult Create(tblEventcategory Model)
        {
            try
            {
                UserId = USession.User_Id;
                string Message = Request.Form["Message"];
                string Approve = Request.Form["Approval"];
                Connection.GDsetEventCategory(Model.EventCategoryDesc, Message, Approve, UserId, "Y");
                Connection.SaveChanges();

                //return View();

                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                Errorlog.ErrorManager.LogError(ex);
                return(View());
            }
        }
示例#3
0
        public ActionResult Edit(long CategoryId)
        {
            try
            {
                EventCategoryModel TModel = new EventCategoryModel();

                tblEventcategory TCtable = Connection.tblEventcategories.SingleOrDefault(x => x.EventCategoryId == CategoryId);
                TModel.IsActive = TCtable.IsActive;

                TModel.EventCategoryId      = TCtable.EventCategoryId;
                TModel.EventCategoryDesc    = TCtable.EventCategoryDesc;
                TModel.BroadcastMessage     = TCtable.BroadcastMessage;
                TModel.ParentApprovalNeeded = TCtable.ParentApprovalNeeded;

                return(PartialView("EditEventCategory", TModel));
            }
            catch (Exception ex)
            {
                Errorlog.ErrorManager.LogError(ex);
                return(View());
            }
        }