Exemplo n.º 1
0
        public Pliromi get_Pliromi_By_Id(Pliromi myPliromi)
        {
            Dal           myDal        = new Dal();
            Pliromi       otherPliromi = new Pliromi();
            DataTable     dt           = new DataTable();
            SqlDataReader dr           = myDal.getPliromiById(myPliromi);

            if (dr.HasRows)
            {
                dt.Load(dr);
            }
            foreach (DataRow row in dt.Rows)
            {
                otherPliromi.Pliromi_opid = Convert.ToInt32(row["op_id"].ToString());
                otherPliromi.PliromiId    = Convert.ToInt32(row["p_id"].ToString());
                otherPliromi.PayDay       = Convert.ToDateTime(row["p_date"].ToString());
                otherPliromi.p_opasm      = Convert.ToInt32(row["op_asm"].ToString());
                otherPliromi.bathmos      = row["r_perigrafi"].ToString();
                otherPliromi.onoma        = row["op_onoma"].ToString();
                otherPliromi.eponymo      = row["op_eponymo"].ToString();
                otherPliromi.loxos        = row["op_loxos"].ToString();
                otherPliromi.katName      = row["kat_name"].ToString();
                otherPliromi.katalogisteo = Convert.ToDecimal(row["kat_katalogisteo"].ToString());
                otherPliromi.kratiseis    = Convert.ToDecimal(row["kat_kratiseis"].ToString());
                otherPliromi.pliroteo     = Convert.ToDecimal(row["kat_pliroteo"].ToString());
                otherPliromi.mPerigrafi   = row["m_perigrafi"].ToString();
                float temp = Convert.ToSingle(row["p_posoPliromis"].ToString());
                otherPliromi.Poso = Convert.ToDecimal(temp);
            }
            return(otherPliromi);
        }