public ActionResult Create(RightBannerViewModel item)
 {
     if (ModelState.IsValid)
     {
         RightBanner model = new RightBanner();
         model.Name = item.Name;
         model.PlanName = item.PlanName;
         model.Unit = item.Unit;
         model.Link = item.Link;
         if (_iServiceRighBanner.SaveAdd(model))
         {
             SessionUserHelper.CreateSessionSuccess(ConstantStrings.AddSuccess);
         }
         else
         {
             SessionUserHelper.CreateSessionError(ConstantStrings.AddNonSuccess);
         }
         return RedirectToAction("Index");
     }
     return View(item);
 }
 public RightBanner GetRightBannerModel(RightBannerViewModel model)
 {
     var item = new RightBanner();
     item.Id = model.Id;
     item.Name = model.Name;
     item.Unit = model.Unit;
     item.PlanName = model.PlanName;
     item.Link = model.Link;
     return item;
 }
 public RightBannerViewModel GetRightBannerViewModel(int id)
 {
     var model = _iServiceRighBanner.GetItemTitle(id);
     var item = new RightBannerViewModel();
     item.Id = model.Id;
     item.Unit = model.Unit;
     item.Name = model.Name;
     item.PlanName = model.PlanName;
     item.Link = model.Link;
     return item;
 }
        public ActionResult Edit(RightBannerViewModel model)
        {
            if (ModelState.IsValid)
            {
                if (_iServiceRighBanner.SaveEdit(GetRightBannerModel(model)))
                {
                    SessionUserHelper.CreateSessionSuccess(ConstantStrings.EditSuccess);
                }
                else
                {
                    SessionUserHelper.CreateSessionError(ConstantStrings.EditNonSuccess);
                }
                return RedirectToAction("Index");

            }
            return View(model);
        }