List <eDrug> IService1.getAllDrugs()
        {
            List <eDrug> ls = new List <eDrug>();

            foreach (Drug dr in drugdal.getAllDrug())
            {
                eDrug edr = new eDrug();
                edr.DrugID      = dr.DrugID;
                edr.Description = dr.Description;
                edr.Name        = dr.Name;
                edr.Price       = Convert.ToDouble(dr.Price);
                edr.TypeID      = dr.TypeID;
                ls.Add(edr);
            }
            return(ls);
        }
Beispiel #2
0
        List <eDrug> IService1.getAllDrugs()
        {
            List <eDrug> ls = new List <eDrug>();

            foreach (Drug dr in drugdal.getAllDrug())
            {
                eDrug edr = new eDrug();
                edr.DrugID      = dr.DrugID;
                edr.Description = dr.Description;
                edr.Name        = dr.Name;
                edr.Price       = Convert.ToDouble(dr.Price);
                TypeOfDrug t = new TypeOfDrug();
                t = typedal.getOneTypeOfDrug(dr.TypeID);
                eTypeOfDrug et = new eTypeOfDrug();
                et.Type        = t.Type;
                et.Description = t.Description;
                edr.Type       = et;
                ls.Add(edr);
            }
            return(ls);
        }
Beispiel #3
0
 private void Form1_Load(object sender, EventArgs e)
 {
     dataGridView1.DataSource = dal.getAllDrug();
 }