public void Insert(string CustomerID, string CustomerTypeID)
        {
            CustomerCustomerDemo item = new CustomerCustomerDemo();

            item.CustomerID = CustomerID;

            item.CustomerTypeID = CustomerTypeID;


            item.Save(UserName);
        }
        public void Update(string CustomerID, string CustomerTypeID)
        {
            CustomerCustomerDemo item = new CustomerCustomerDemo();

            item.CustomerID = CustomerID;

            item.CustomerTypeID = CustomerTypeID;

            item.MarkOld();
            item.Save(UserName);
        }
Ejemplo n.º 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 CustomerTypeID=@CustomerTypeID", CustomerDemographic.Schema.Provider.Name);

            cmdDel.AddParameter("@CustomerTypeID", varCustomerTypeID);
            //add this in
            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();
            }
        }
 public bool Destroy(object CustomerID)
 {
     return(CustomerCustomerDemo.Destroy(CustomerID) == 1);
 }
 public bool Delete(object CustomerID)
 {
     return(CustomerCustomerDemo.Delete(CustomerID) == 1);
 }