public void UpdateCatalogData(int index,string cateId, DZoft.dBug.TCS.DL.PickBase.openMode opMode,IEnumerable<AdminCatalogItemModel>models ) { DZoft.dBug.TCS.DL.Catalogs t = new DZoft.dBug.TCS.DL.Catalogs(cateId); //t.AddVariable("CATALOG", ddlCats.SelectedValue); foreach (var model in models) { t.SKUS = model.Sku; t.Sources = model.Mod; t.Titles = model.Title; t.Prices = model.Price; t.SalePrices = model.SalesPrice; } t.AddVariable("UPDATETYPE", "ITEMS"); t.Write(); }
public void AddCatalogItem(string cateId,string sku, string source, string title, string price, string saleprice,IEnumerable<AdminCatalogItemModel>models ) { var t = new DZoft.dBug.TCS.DL.Catalogs(cateId); source = source.ToLower(); if (source.Equals("textbook")) { source = "TX"; } else { source = source.Equals("Tradebook") ? "TR" : "GM"; } foreach (var model in models) { t.SKUS = model.Sku; t.Sources = model.Mod; t.Titles = model.Title; t.Prices = model.Price; t.SalePrices = model.SalesPrice; } //Value to insert t.AddVariable("UPDATETYPE", "ITEMS"); //t.AddVariable("CATALOG", ddlCats.SelectedValue); t.SKUS = sku; t.Sources = source; t.Titles = title; t.Prices = price; t.SalePrices = saleprice; t.Write(); }