Example #1
0
 public void Print(LdtCustomerInfo cust, DateTime? from, DateTime? to)
 {
     if (cust == null)
         return;
     if(!doc.PrinterSettings.IsValid)
         throw new ApplicationException("��Ч�Ĵ�ӡ����" + doc.PrinterSettings.PrinterName);
     if (cust.LdtBills == null || cust.LdtBills.Count == 0)
         return;
     this.from = from;
     this.to = to;
     printList = new List<LdtCustomerInfo>();
     printList.Add(cust);
     doc.Print();
 }
Example #2
0
 public IList<LdtCustomerInfo> GetLdtCustomer(bool nameNotNull,bool addressNotNull)
 {
     string sql = "select DH, CUST, ADDR, CODE_ID from [MAILDDBILL_�����嵥�����û�] ";
     sql += "where iif(isnull(DH),'',DH)<>'' ";
     if (nameNotNull)
         sql += "and iif(isnull(CUST),'',CUST)<>'' ";
     if (addressNotNull)
         sql += "and iif(isnull(ADDR),'',ADDR)<>'' ";
     DataTable table = Select(sql);
     IList<LdtCustomerInfo> list = new List<LdtCustomerInfo>();
     foreach (DataRow row in table.Rows)
     {
         LdtCustomerInfo cust = new LdtCustomerInfo();
         cust.PhoneNo = row["DH"].ToString().Trim();
         cust.Name = row["CUST"].ToString().Trim();
         cust.Address = row["ADDR"].ToString().Trim();
         cust.Postcode = row["CODE_ID"].ToString().Trim();
         list.Add(cust);
     }
     dicBillCache = null;
     return list;
 }