Ejemplo n.º 1
0
 /// <summary>
 /// ���ɳ��ⵥ��
 /// </summary>
 /// <returns></returns>
 public string GetNewBillNo()
 {
     using (PersistentManager persistentManager = new PersistentManager())
     {
         DownOutBillDao dao = new DownOutBillDao();
         DataSet ds = dao.FindOutBillNo(System.DateTime.Now.ToString("yyMMdd"));
         if (ds.Tables[0].Rows.Count == 0)
         {
             return System.DateTime.Now.ToString("yyMMdd") + "0001" + "OU";
         }
         else
         {
             int i = Convert.ToInt32(ds.Tables[0].Rows[0][0].ToString().Substring(6, 4));
             i++;
             string newcode = i.ToString();
             for (int j = 0; j < 4 - i.ToString().Length; j++)
             {
                 newcode = "0" + newcode;
             }
             return System.DateTime.Now.ToString("yyMMdd") + newcode + "OU";
         }
     }
 }