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); }
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(); } }
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(); } } }
public bool Destroy(object ContactID) { return(ContactCreditCard.Destroy(ContactID) == 1); }
public bool Delete(object ContactID) { return(ContactCreditCard.Delete(ContactID) == 1); }