public void UpdatePosSettings(PosSettingsDetailViewModel model)
        {
            var query = from p in m_contentContext.Pos_Settings
                        where p.Id == model.Id
                        select p;
            var item = query.FirstOrDefault();

            Mapper.Map(model, item);
            m_contentContext.SaveChanges();
        }
 public ActionResult Edit(PosSettingsDetailViewModel model)
 {
     if (ModelState.IsValid)
     {
         try
         {
             m_posWorker.UpdatePosSettings(model);
             return(RedirectToAction("Index"));
         }
         catch (Exception ex)
         {
             ModelState.AddModelError("General", ex.Message);
         }
     }
     this.StatusList(model.Status);
     return(View(model));
 }