コード例 #1
0
        public static void AddItem(EVEItem item)
        {
            var result = (from t in _pricesContext.tblActiveItems
                          where (t.itemID == item.TypeID)
                          select t).ToList();

            if (result.Count == 0)
            {
                tblActiveItem newItem = new tblActiveItem();
                newItem.itemID = item.TypeID;
                newItem.isActive = true;
                newItem.lastUpdated = null;

                _pricesContext.tblActiveItems.InsertOnSubmit(newItem);

                _pricesContext.SubmitChanges();
            }
            else
            {
                tblActiveItem foundItem = result.First();
                if (foundItem.isActive == false)
                {
                    foundItem.isActive = true;
                    _pricesContext.SubmitChanges();
                }
            }
        }
コード例 #2
0
        public static void AddItem(EVEItem item)
        {
            var result = (from t in _pricesContext.tblActiveItems
                          where (t.itemID == item.TypeID)
                          select t).ToList();

            if (result.Count == 0)
            {
                tblActiveItem newItem = new tblActiveItem();
                newItem.itemID      = item.TypeID;
                newItem.isActive    = true;
                newItem.lastUpdated = null;

                _pricesContext.tblActiveItems.InsertOnSubmit(newItem);

                _pricesContext.SubmitChanges();
            }
            else
            {
                tblActiveItem foundItem = result.First();
                if (foundItem.isActive == false)
                {
                    foundItem.isActive = true;
                    _pricesContext.SubmitChanges();
                }
            }
        }
コード例 #3
0
 partial void DeletetblActiveItem(tblActiveItem instance);
コード例 #4
0
 partial void UpdatetblActiveItem(tblActiveItem instance);
コード例 #5
0
 partial void InserttblActiveItem(tblActiveItem instance);
コード例 #6
0
 partial void DeletetblActiveItem(tblActiveItem instance);
コード例 #7
0
 partial void UpdatetblActiveItem(tblActiveItem instance);
コード例 #8
0
 partial void InserttblActiveItem(tblActiveItem instance);