Beispiel #1
0
        public static string GetSellInvoiceCode()
        {
            SelInvoiceDT sellInvoiceDT = new SelInvoiceDT();
            string       mmyy          = getMMyy();
            DataTable    invoiceTable  = sellInvoiceDT.GetByCond("Code like 'SI" + mmyy + "%'", " Code DESC");
            string       prefix        = "SI" + mmyy;
            string       suffix        = "0001";

            if (invoiceTable != null && invoiceTable.Rows.Count > 0)
            {
                suffix = getSuffix(invoiceTable.Rows[0]["Code"].ToString());
            }
            return(prefix + suffix);
        }
Beispiel #2
0
 public SelInvoiceRule IsExits(string cond, string message)
 {
     try
     {
         DataTable dt = dta.GetByCond(cond);
         if (dt != null && dt.Rows.Count > 0)
         {
             IsPassed    = false;
             ErrMessage += message;
         }
         return(this);
     }
     catch (Exception e)
     {
         IsPassed = false;
         throw e;
     }
 }