示例#1
0
        protected AutoGenSerial(string maTrungTam, int idNhanVien)
        {
            sysDate = CommonProvider.Instance.GetSysDate();

            MaTrungTam = maTrungTam;

            IdNhanVien = idNhanVien;

            smallPrinter = new SmallSerialPrinter();

            bigPrinter = new BigSerialPrinter2();
        }
示例#2
0
        public void Merge(GodexPrinter godexPrinter)
        {
            if (godexPrinter.Count == 0)
            {
                return;
            }

            foreach (var serial in godexPrinter)
            {
                Add(serial);
            }

            if (ordered)
            {
                return;
            }

            Sort(Comp);

            //reindex

            for (var i = 0; i < Count; i++)
            {
                if (i == 0)
                {
                    this[i].Pos = 0;
                }
                else
                {
                    if (this[i - 1].Printer.IsStrong(this[i]))
                    {
                        this[i].Pos = (this[i - 1].Pos + 1) % this[i - 1].Printer.Presentations.Length;
                    }
                    else
                    {
                        this[i].Pos = getNextLabel() * this[i].Printer.NumOfSerialPerLabel;
                    }
                }
                CurrentLabel = this[i].Label = this[i].Pos / this[i].Printer.NumOfSerialPerLabel;
            }

            ordered = true;
        }
示例#3
0
 protected internal abstract bool IsStrong(GodexPrinter printer);
示例#4
0
 protected internal override bool IsStrong(GodexPrinter printer)
 {
     return(printer is BigSerialPrinter2 || printer is BigSerialPrinter);
 }