public void UpdateCheckFamily(UpdateCheckFamilyViewModel model)
 {
     try
     {
         if (model != null && model.CheckFamilyRowID > 0)
         {
             db.MasterCheckFamilies.Single(c => c.CheckFamilyRowID == model.CheckFamilyRowID).CheckFamilyName = model.CheckFamilyName;
         }
     }
     catch (Exception)
     {
         throw;
     }
 }
 public UpdateCheckFamilyViewModel GetCheckFamilyForUpdateById(short CFRowID)
 {
     try
     {
         UpdateCheckFamilyViewModel model = new UpdateCheckFamilyViewModel();
         var entity = db.MasterCheckFamilies.Find(CFRowID);
         if (entity != null)
         {
             model.CheckFamilyRowID = entity.CheckFamilyRowID;
             model.CheckFamilyName  = entity.CheckFamilyName;
             model.Status           = entity.Status;
         }
         else
         {
             throw new Exception("Invalid Id!");
         }
         return(model);
     }
     catch (Exception)
     {
         throw;
     }
 }