Example #1
0
        public void Update(Book.Model.Invoice01 detail, Book.Model.InvoiceFK invoiceFK)
        {
            string invoiceKind = detail.Kind.ToUpper();

            System.Collections.Hashtable hash = new System.Collections.Hashtable();
            hash.Add("InvoiceId", detail.InvoiceId);
            hash.Add("invoiceFKId", invoiceFK.InvoiceId);
            hash.Add("XPmoney", detail.PayReceived);
            switch (invoiceKind)
            {
            case "CG":
                sqlmapper.Update("XP1.update_invoiceid_invoicefk", hash);
                break;

            case "XT":
                sqlmapper.Update("XP2.update_invoiceid_invoicefk", hash);
                break;

            default:
                break;
            }
        }
Example #2
0
 public void Delete(Book.Model.InvoiceFK invoice)
 {
     sqlmapper.Delete("XP2.delete_by_invoicefkid", invoice.InvoiceId);
 }
Example #3
0
 public IList <Book.Model.XP2> Select(Book.Model.InvoiceFK invoice)
 {
     return(sqlmapper.QueryForList <Model.XP2>("XP2.select_by_invoicefkid", invoice.InvoiceId));
 }