Beispiel #1
0
        public static DataTable GetallHebrew(int KidId)
        {
            string    com = "SELECT KidsID as [תז של הילד], KidsName as [שם הילד], KidsLast as [שם משפחה], TestDate as [תאריך השלמת המשחק], Theme as [נושא המשחק], TestResult as [(תוצאה (מתוך 100] from KidDidTest WHERE KidsID = " + KidId + " AND Theme = 'Hebrew' ORDER BY TestDate DESC";
            DataTable dt  = OLEDBHelper.GetTable(com);

            return(dt);
        }
        public static int GetKidId(int ParentID)
        {
            string    com = "select * from ParentKid where ParentsID = " + ParentID;
            DataTable dt  = OLEDBHelper.GetTable(com);
            DataRow   dr  = dt.Rows[0];

            return(int.Parse(dr["KidsID"].ToString()));
        }
        public static DataTable AllKidsName(int ParentID)
        {
            string    com = "SELECT ParentKid.ParentsID, Kids.KidsID, Kids.KidsName FROM Kids INNER JOIN ParentKid ON Kids.KidsID = ParentKid.KidsID WHERE ParentKid.ParentsID = " + ParentID;
            DataTable dt  = OLEDBHelper.GetTable(com);



            return(dt);
        }
        public static int HowMuch(int ParentID)
        {
            string com = "select * from ParentKid where ParentsID = " + ParentID;



            DataTable dt = OLEDBHelper.GetTable(com);

            return(dt.Rows.Count);
        }
Beispiel #5
0
        public static void GetInfo(int KidId)
        {
            string s = "SELECT * from KidDidTest WHERE  KidsID = " + KidId + "";

            ;
            DataTable dt = OLEDBHelper.GetTable(s);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                DataRow dr = dt.Rows[i];
                dr["KidsName"].ToString();
            }
        }
Beispiel #6
0
        public static bool checkID(int KidsID)
        {
            string    s  = "SELECT * from Kids WHERE KidsID = " + KidsID + "";
            DataTable dt = OLEDBHelper.GetTable(s);

            if (dt.Rows.Count > 0)
            {
                return(true);
            }

            else
            {
                return(false);
            }
        }
Beispiel #7
0
        public static bool check(string ParentsName, int ParentsID)
        {
            string    s  = "SELECT * from Parents WHERE ParentsName = '" + ParentsName + "' AND ParentsID = " + ParentsID + "";
            DataTable dt = OLEDBHelper.GetTable(s);

            if (dt.Rows.Count > 0)
            {
                return(true);
            }

            else
            {
                return(false);
            }
        }
Beispiel #8
0
        public static string FindKid(int KidsID)
        {
            string    s  = "SELECT * from Kids WHERE  KidsID = " + KidsID + "";
            DataTable dt = OLEDBHelper.GetTable(s);

            if (dt.Rows.Count > 0)
            {
                DataRow dr = dt.Rows[0];
                return(dr["KidsName"].ToString());
            }

            else
            {
                return("");
            }
        }
        public static void AddParentKid(int ParentsID, int KidsID)
        {
            string com = "insert into ParentKid (ParentsID , KidsID) VALUES ('" + ParentsID + "' , '" + KidsID + "')";

            OLEDBHelper.Execute(com);
        }
        public static void AddTest(string Theme)
        {
            string com = "insert into Tests (Theme) VALUES ('" + Theme + "')";

            OLEDBHelper.Execute(com);
        }
Beispiel #11
0
        public static DataTable GetKid(int TestID)
        {
            string com = "select * from TestKid where TestID = " + TestID;

            return(OLEDBHelper.GetTable(com));
        }
Beispiel #12
0
        public static void DeleteTestKid(int KidsID)
        {
            string com = "Delete From TestKid where KidsID = " + KidsID;

            OLEDBHelper.Execute(com);
        }
Beispiel #13
0
        public static void AddTestKid(int KidsID, int TestID, int TestResult)
        {
            string com = "insert into TestKid (KidsID , TestID, TestResult, TestDate) VALUES ('" + KidsID + "' , '" + TestID + "', " + TestResult + ", '" + DateTime.Today.ToString("dd/MM/yyyy") + "')";

            OLEDBHelper.Execute(com);
        }
Beispiel #14
0
        public static void DeleteParent(int ParentsID)
        {
            string com = "Delete From Parents where ParentsID =" + ParentsID;

            OLEDBHelper.Execute(com);
        }
Beispiel #15
0
        public static void UpdateParent(int ParentsID, string ParentsName, string ParentsLast)
        {
            string com = "update Parents set ParentsName = '" + ParentsName + "' , ParentsLast = '" + ParentsLast + "' where ParentsID=" + ParentsID;

            OLEDBHelper.Execute(com);
        }
Beispiel #16
0
        public static DataTable GetAllParents()
        {
            string com = "select * from Parents";

            return(OLEDBHelper.GetTable(com));
        }
Beispiel #17
0
        public static void AddParent(int ParentsID, string ParentsName, string ParentsLast)
        {
            string com = "insert into Parents (ParentsID , ParentsName , ParentsLast) VALUES ('" + ParentsID + "', '" + ParentsName + "' , '" + ParentsLast + "')";

            OLEDBHelper.Execute(com);
        }
        public static DataTable GetKid(int ParentID)
        {
            string com = "select * from ParentKid where ParentID = " + ParentID;

            return(OLEDBHelper.GetTable(com));
        }
Beispiel #19
0
        public static void UpdateKid(int KidsID, string KidsName, string KidsLast)
        {
            string com = "update Kids set KidsName = '" + KidsName + "' , KidsLast = '" + KidsLast + "' where KidsID=" + KidsID;

            OLEDBHelper.Execute(com);
        }
Beispiel #20
0
        public static void AddKid(int KidsID, string KidsName, string KidsLast)
        {
            string com = "insert into Kids (KidsID , KidsName , KidsLast) VALUES ('" + KidsID + "', '" + KidsName + "' , '" + KidsLast + "')";

            OLEDBHelper.Execute(com);
        }
        public static DataTable GetTest(string Theme)
        {
            string com = "select * from Tests where Theme = '" + Theme + "'";

            return(OLEDBHelper.GetTable(com));
        }
        public static void DeleteTest(string Theme)
        {
            string com = "Delete From Tests where Theme = '" + Theme + "'";

            OLEDBHelper.Execute(com);
        }