Esempio n. 1
0
        public ActionResult selectPodFee()
        {
            string startBatchNumber;
            string startBatchNumber1;
            string startBatchNumber2;
            int    count = 0;

            startBatchNumber = new DistributionService().selectPodFee();
            if (string.IsNullOrEmpty(startBatchNumber))
            {
                startBatchNumber = DateTime.Now.YearMonthDay().ToString();
                startBatchNumber = startBatchNumber.Replace("-", "");
                startBatchNumber = startBatchNumber + "001";
            }
            else
            {
                startBatchNumber1 = startBatchNumber.Substring(startBatchNumber.Length - 3);
                startBatchNumber2 = startBatchNumber.Substring(0, 8);
                count             = startBatchNumber1.ObjectToInt32();
                count             = count + 1;
                if (count / 10 == 0)
                {
                    startBatchNumber = startBatchNumber2 + "00" + count.ToString();
                }
                else if (count / 100 == 0)
                {
                    startBatchNumber = startBatchNumber2 + "0" + count.ToString();
                }
                else
                {
                    startBatchNumber = startBatchNumber2 + count.ToString();
                }
            }
            return(this.Json(startBatchNumber));
        }