コード例 #1
0
        public void Update(int ProductModelID, int ProductDescriptionID, string CultureID, DateTime ModifiedDate)
        {
            ProductModelProductDescriptionCulture item = new ProductModelProductDescriptionCulture();

            item.ProductModelID = ProductModelID;

            item.ProductDescriptionID = ProductDescriptionID;

            item.CultureID = CultureID;

            item.ModifiedDate = ModifiedDate;

            item.MarkOld();
            item.Save(UserName);
        }
コード例 #2
0
        public static void SaveProductModelMap(int varProductDescriptionID, int[] itemList)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM ProductModelProductDescriptionCulture WHERE ProductDescriptionID=@ProductDescriptionID", ProductDescription.Schema.Provider.Name);

            cmdDel.AddParameter("@ProductDescriptionID", varProductDescriptionID);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (int item in itemList)
            {
                ProductModelProductDescriptionCulture varProductModelProductDescriptionCulture = new ProductModelProductDescriptionCulture();
                varProductModelProductDescriptionCulture.SetColumnValue("ProductDescriptionID", varProductDescriptionID);
                varProductModelProductDescriptionCulture.SetColumnValue("ProductModelID", item);
                varProductModelProductDescriptionCulture.Save();
            }
        }
コード例 #3
0
        public static void SaveProductModelMap(string varCultureID, ProductModelCollection items)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM ProductModelProductDescriptionCulture WHERE CultureID=@CultureID", Culture.Schema.Provider.Name);

            cmdDel.AddParameter("@CultureID", varCultureID);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (ProductModel item in items)
            {
                ProductModelProductDescriptionCulture varProductModelProductDescriptionCulture = new ProductModelProductDescriptionCulture();
                varProductModelProductDescriptionCulture.SetColumnValue("CultureID", varCultureID);
                varProductModelProductDescriptionCulture.SetColumnValue("ProductModelID", item.GetPrimaryKeyValue());
                varProductModelProductDescriptionCulture.Save();
            }
        }
コード例 #4
0
        public static void SaveCultureMap(int varProductDescriptionID, System.Web.UI.WebControls.ListItemCollection itemList)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM ProductModelProductDescriptionCulture WHERE ProductDescriptionID=@ProductDescriptionID", ProductDescription.Schema.Provider.Name);

            cmdDel.AddParameter("@ProductDescriptionID", varProductDescriptionID);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (System.Web.UI.WebControls.ListItem l in itemList)
            {
                if (l.Selected)
                {
                    ProductModelProductDescriptionCulture varProductModelProductDescriptionCulture = new ProductModelProductDescriptionCulture();
                    varProductModelProductDescriptionCulture.SetColumnValue("ProductDescriptionID", varProductDescriptionID);
                    varProductModelProductDescriptionCulture.SetColumnValue("CultureID", l.Value);
                    varProductModelProductDescriptionCulture.Save();
                }
            }
        }
コード例 #5
0
 public bool Destroy(object ProductModelID)
 {
     return(ProductModelProductDescriptionCulture.Destroy(ProductModelID) == 1);
 }