コード例 #1
0
        private static void DownloadTBCategories()
        {
            TBProductUploadServiceImpl impl = new TBProductUploadServiceImpl();
            List<ItemCat> catList = impl.GetItemCats();

            foreach (var cat in catList)
            {
                using (TaoBaoDataContext tbCon = new TaoBaoDataContext())
                {
                    TB_ItemCat obj = new TB_ItemCat();
                    obj.ID = Guid.NewGuid();
                    obj.Cid = cat.Cid;
                    obj.Name = cat.Name;
                    obj.IsParent = cat.IsParent;

                    if (!string.IsNullOrEmpty(cat.ModifiedTime))
                    {
                        obj.ModifiedTime = DateTime.Parse(cat.ModifiedTime);
                    }
                    obj.ModifiedType = cat.ModifiedType;
                    obj.ParentCid = cat.ParentCid;
                    obj.SortOrder = (int)cat.SortOrder;
                    obj.Status = cat.Status;

                    tbCon.TB_ItemCats.InsertOnSubmit(obj);
                    tbCon.SubmitChanges();
                }

            }
        }
コード例 #2
0
 partial void UpdateTB_ItemCat(TB_ItemCat instance);
コード例 #3
0
 partial void DeleteTB_ItemCat(TB_ItemCat instance);
コード例 #4
0
 partial void InsertTB_ItemCat(TB_ItemCat instance);