Beispiel #1
0
        public List <Katigoria> getMoney()
        {
            Dal              myDal    = new Dal();
            DataTable        dt       = new DataTable();
            List <Katigoria> category = new List <Katigoria>();
            SqlDataReader    mSq      = myDal.getMoney();

            if (mSq.HasRows)
            {
                dt.Load(mSq);
            }
            foreach (DataRow dr in dt.Rows)
            {
                Katigoria myKatigoria = new Katigoria();
                myKatigoria.katId           = Convert.ToInt32(dr["kat_id"].ToString());
                myKatigoria.katPerigrafi    = dr["kat_name"].ToString();
                myKatigoria.katKatalogisteo = Convert.ToDecimal(dr["kat_katalogisteo"].ToString());
                myKatigoria.katKratiseis    = Convert.ToDecimal(dr["kat_kratiseis"].ToString());
                myKatigoria.katPliroteo     = Convert.ToDecimal(dr["kat_pliroteo"].ToString());
                myKatigoria.katDXmas        = Convert.ToDecimal(dr["kat_dx"].ToString());
                myKatigoria.katDPasxa       = Convert.ToDecimal(dr["kat_dp"].ToString());
                category.Add(myKatigoria);
            }
            return(category);
        }