public ActionResult Create(T_CMS_Master_Salutation model)
 {
     try
     {
         if (ModelState.IsValid)
         {
             // model.CreatedUser = CurrentUser.UserName;
             if (model.SalutationID != 0)
             {
                 //get default value
                 //	T_CMS_Master_Salutation b = T_CMS_Master_SalutationManager.GetById(model.SalutationID);
                 T_CMS_Master_SalutationManager.Update(model);
             }
             else
             {
                 // TODO: Add insert logic here
                 model.CreatedDate = SystemConfig.CurrentDate;
                 T_CMS_Master_SalutationManager.Add(model);
             }
             return(View(ViewFolder + "list.cshtml", T_CMS_Master_SalutationManager.GetAll()));
         }
     }
     catch
     {
         return(View(model));
     }
     return(View(model));
 }
        public ContentResult Save(string objdata, string value)
        {
            JsonObject js = new JsonObject();

            js.StatusCode = 200;
            js.Message    = "Upload Success";
            try
            {
                T_CMS_Master_Salutation obj = JsonConvert.DeserializeObject <T_CMS_Master_Salutation>(objdata);
                obj = T_CMS_Master_SalutationManager.Update(obj);
                if (obj.SalutationID == 0)
                {
                    js.StatusCode = 400;
                    js.Message    = "Has Errors. Please contact Admin for more information";
                }
                else
                {
                    js.Data = obj;
                }
            }
            catch (Exception objEx)
            {
                js.StatusCode = 400;
                js.Message    = objEx.Message;
            }

            return(Content(JsonConvert.SerializeObject(js), "application/json"));
        }
 public ActionResult Update(T_CMS_Master_Salutation model)
 {
     try
     {
         if (ModelState.IsValid)
         {
             // TODO: Add insert logic here
             T_CMS_Master_SalutationManager.Update(model);
             //return RedirectToAction("Index");
         }
         return(View(model));
     }
     catch
     {
         return(View(model));
     }
 }