コード例 #1
0
        public void Insert(string CustomerID, string CustomerTypeID)
        {
            CustomerCustomerDemo item = new CustomerCustomerDemo();

            item.CustomerID = CustomerID;

            item.CustomerTypeID = CustomerTypeID;


            item.Save(UserName);
        }
コード例 #2
0
        public void Update(string CustomerID, string CustomerTypeID)
        {
            CustomerCustomerDemo item = new CustomerCustomerDemo();

            item.MarkOld();
            item.IsLoaded = true;

            item.CustomerID = CustomerID;

            item.CustomerTypeID = CustomerTypeID;

            item.Save(UserName);
        }
コード例 #3
0
        public static void SaveCustomerMap(string varCustomerTypeID, string[] itemList)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM [CustomerCustomerDemo] WHERE [CustomerCustomerDemo].[CustomerTypeID] = @CustomerTypeID", CustomerDemographic.Schema.Provider.Name);

            cmdDel.AddParameter("@CustomerTypeID", varCustomerTypeID, DbType.String);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (string item in itemList)
            {
                CustomerCustomerDemo varCustomerCustomerDemo = new CustomerCustomerDemo();
                varCustomerCustomerDemo.SetColumnValue("CustomerTypeID", varCustomerTypeID);
                varCustomerCustomerDemo.SetColumnValue("CustomerID", item);
                varCustomerCustomerDemo.Save();
            }
        }
コード例 #4
0
 public bool Destroy(object CustomerID)
 {
     return(CustomerCustomerDemo.Destroy(CustomerID) == 1);
 }
コード例 #5
0
 public bool Delete(object CustomerID)
 {
     return(CustomerCustomerDemo.Delete(CustomerID) == 1);
 }