示例#1
0
        public void Update(int ContactID, int CreditCardID, DateTime ModifiedDate)
        {
            ContactCreditCard item = new ContactCreditCard();

            item.ContactID = ContactID;

            item.CreditCardID = CreditCardID;

            item.ModifiedDate = ModifiedDate;

            item.MarkOld();
            item.Save(UserName);
        }
示例#2
0
        public static void SaveContactMap(int varCreditCardID, int[] itemList)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM ContactCreditCard WHERE CreditCardID=@CreditCardID", CreditCard.Schema.Provider.Name);

            cmdDel.AddParameter("@CreditCardID", varCreditCardID);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (int item in itemList)
            {
                ContactCreditCard varContactCreditCard = new ContactCreditCard();
                varContactCreditCard.SetColumnValue("CreditCardID", varCreditCardID);
                varContactCreditCard.SetColumnValue("ContactID", item);
                varContactCreditCard.Save();
            }
        }
示例#3
0
        public static void SaveCreditCardMap(int varContactID, System.Web.UI.WebControls.ListItemCollection itemList)
        {
            QueryCommandCollection coll = new SubSonic.QueryCommandCollection();
            //delete out the existing
            QueryCommand cmdDel = new QueryCommand("DELETE FROM ContactCreditCard WHERE ContactID=@ContactID", Contact.Schema.Provider.Name);

            cmdDel.AddParameter("@ContactID", varContactID);
            coll.Add(cmdDel);
            DataService.ExecuteTransaction(coll);
            foreach (System.Web.UI.WebControls.ListItem l in itemList)
            {
                if (l.Selected)
                {
                    ContactCreditCard varContactCreditCard = new ContactCreditCard();
                    varContactCreditCard.SetColumnValue("ContactID", varContactID);
                    varContactCreditCard.SetColumnValue("CreditCardID", l.Value);
                    varContactCreditCard.Save();
                }
            }
        }
示例#4
0
 public bool Destroy(object ContactID)
 {
     return(ContactCreditCard.Destroy(ContactID) == 1);
 }
示例#5
0
 public bool Delete(object ContactID)
 {
     return(ContactCreditCard.Delete(ContactID) == 1);
 }