Esempio n. 1
0
        public Katigoria get_Katigoria_By_Id(Oplitis myOplitis)
        {
            Dal           myDal       = new Dal();
            Katigoria     myKatigoria = new Katigoria();
            DataTable     dt          = new DataTable();
            SqlDataReader dr          = myDal.getKatigoriaById(myOplitis);

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