예제 #1
0
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            //[Take Row]
            MealTWCell cell = tableView.CellAt(indexPath) as MealTWCell;

            if (cell != null && cell.m_bWasChanged)
            {
                BasketMealsRecord bmr;
                if (cell.m_bChecked)
                {
                    bmr = new BasketMealsRecord();
                    bmr.RecipeMealsID = m_tableItems[indexPath.Row].m_RecMealID;
                    BasketManager.SaveBasketRecord(bmr);
                }
                else
                {
                    bmr = BasketManager.GetBasketRecipeRecord(m_tableItems[indexPath.Row].m_RecMealID);
                    if (bmr != null)
                    {
                        BasketManager.DeleteBasketRecord(bmr.ID);
                    }
                }
                cell.m_bWasChanged = false;
            }
            tableView.DeselectRow(indexPath, false);
        }