Esempio n. 1
0
        public static List <Donation> New(RedBloodDataContext db, int count)
        {
            Facility f = FacilityBLL.GetFirst(db);

            int autonum = f.CountingNumber.Value;

            Donation[] l = new Donation[count];

            for (int i = 0; i < l.Length; i++)
            {
                l[i] = new Donation();
                autonum++;
                l[i].DIN               = f.FIN + f.CountingYY + autonum.ToString("D6");
                l[i].Status            = Donation.StatusX.Init;
                l[i].InfectiousMarkers = 0.ToString("D" + BarcodeBLL.InfectiousMarkersLength.ToString());
            }

            f.CountingNumber = autonum;

            db.Donations.InsertAllOnSubmit(l);

            return(l.ToList());
        }
Esempio n. 2
0
        public static List<Donation> New(RedBloodDataContext db, int count)
        {
            Facility f = FacilityBLL.GetFirst(db);

            int autonum = f.CountingNumber.Value;

            Donation[] l = new Donation[count];

            for (int i = 0; i < l.Length; i++)
            {
                l[i] = new Donation();
                autonum++;
                l[i].DIN = f.FIN + f.CountingYY + autonum.ToString("D6");
                l[i].Status = Donation.StatusX.Init;
                l[i].InfectiousMarkers = 0.ToString("D" + BarcodeBLL.InfectiousMarkersLength.ToString());
            }

            f.CountingNumber = autonum;

            db.Donations.InsertAllOnSubmit(l);

            return l.ToList();
        }
        public static List<Donation> New(RedBloodDataContext db, int count)
        {
            Facility f = FacilityBLL.GetFirst(db);

            int autonum = f.CountingNumber.Value;

            Donation[] l = new Donation[count];

            for (int i = 0; i < l.Length; i++)
            {
                l[i] = new Donation();
                autonum++;
                l[i].DIN = f.FIN + f.CountingYY + autonum.ToString("D6");
                l[i].Status = Donation.StatusX.Init;
                l[i].InfectiousMarkers = 0.ToString("D" + BarcodeBLL.InfectiousMarkersLength.ToString());

                //TODO: Should use list to loop to infectious properties
                l[i].TR_HBs_Ag = TR.non;
                l[i].TR_HCV_Ab = TR.non;
                l[i].TR_HIV = TR.non;
                l[i].TR_Malaria = TR.non;
                l[i].TR_Syphilis = TR.non;
            }

            f.CountingNumber = autonum;

            db.Donations.InsertAllOnSubmit(l);

            return l.ToList();
        }