示例#1
0
        public Student GetStudent(string TZ)
        {
            Student value = null;

            ////קבלת הפרטים על התלמיד
            DataTable dt = Functions.ExQueryWithConnStr(string.Format(GET_STUDENT, TZ), new DalHandler().GetConnectionString(CONNTION_STRING_NAME));

            if (dt == null || dt.Rows.Count == 0)
            {
                return(null);
            }

            value          = new DALService().CopyRecord <Student>(dt.Rows[0], typeof(Student));
            value.Payments = new List <Payment>();
            ///קבלת הפרטים על התשלום
            dt = Functions.ExQueryWithConnStr(string.Format(GET_PAYMENT, TZ), new DalHandler().GetConnectionString(CONNTION_STRING_NAME));
            if (dt != null && dt.Rows.Count > 0)
            {
                List <Payment> payments = new DALService().CopyRecords <Payment>(dt, typeof(Payment));
                value.Payments = payments;
            }
            dt         = Functions.ExQueryWithConnStr(string.Format(Get_GIFT, TZ), new DalHandler().GetConnectionString(CONNTION_STRING_NAME));
            value.GIFT = new List <Gifts>();
            if (dt != null && dt.Rows.Count > 0)
            {
                List <Gifts> Gift_All = new DALService().CopyRecords <Gifts>(dt, typeof(Gifts));
                value.GIFT = Gift_All;
            }

            return(value);
        }
示例#2
0
        public List <GiftType> FillType()
        {
            List <GiftType> value = null;
            DataTable       dt    = Functions.ExQueryWithConnStr(GET_CACHE, new DalHandler().GetConnectionString(CONNTION_STRING_NAME));

            if (dt == null || dt.Rows.Count == 0)
            {
                return(null);
            }

            value = new DALService().CopyRecords <GiftType>(dt, typeof(GiftType));

            return(value);
        }