Exemple #1
0
        public static void Update <T>(int clienttID, T newinfo, int place)
        {
            DataSet ds = OleDbHelper.fill(string.Format("select * from Client where ClientID={0}", clienttID), "Client");

            if (ds.Tables["Client"].Rows.Count > 0)
            {
                DataRow dr = ds.Tables["Client"].Rows[0];
                dr[place] = newinfo;
                OleDbHelper.update(ds, "select * from Client", "Client");
            }
        }
Exemple #2
0
        public static void Update <T>(int voucherID, T newinfo, int place)
        {
            DataSet ds = OleDbHelper.fill(string.Format("select * from Voucher where VoucherID={0}", voucherID), "Voucher");

            if (ds.Tables["Voucher"].Rows.Count > 0)
            {
                DataRow dr = ds.Tables["Voucher"].Rows[0];
                dr[place] = newinfo;
                OleDbHelper.update(ds, "select * from Voucher", "Voucher");
            }
        }
Exemple #3
0
        public static void Update <T>(int paymentCode, T newinfo, int place)
        {
            DataSet ds = OleDbHelper.fill(string.Format("select * from Payment where PaymentCode={0}", paymentCode), "Payment");

            if (ds.Tables["Payment"].Rows.Count > 0)
            {
                DataRow dr = ds.Tables["Payment"].Rows[0];
                dr[place] = newinfo;
                OleDbHelper.update(ds, "select * from Payment", "Payment");
            }
        }
Exemple #4
0
        public static void AddLogPas(int clientID, int worker, string login, int password)
        {
            DataSet ds = OleDbHelper.fill("select * from LogPas", "LogPas");

            DataRow dr = ds.Tables["LogPas"].NewRow();

            dr["ClientID"] = clientID;
            dr["Worker"]   = worker;
            dr["Login"]    = login;
            dr["Password"] = password;
            // הוספת הרשומה/שורה ל
            // DATASET
            ds.Tables["LogPas"].Rows.Add(dr);
            // עידכון מסד הנתונים
            OleDbHelper.update(ds, "select * from LogPas", "LogPas");
        }
Exemple #5
0
        public static void AddPayment(int VaucherID, string DATES, int Amount)
        {
            DataSet ds = OleDbHelper.fill("select * from Payment", "Payment");

            DataRow dr = ds.Tables["Payment"].NewRow();

            dr["VoucherID"] = VaucherID;
            dr["DATES"]     = DATES;
            dr["Amount"]    = Amount;

            // הוספת הרשומה/שורה ל
            // DATASET
            ds.Tables["Payment"].Rows.Add(dr);
            // עידכון מסד הנתונים
            OleDbHelper.update(ds, "select * from Payment", "Payment");
        }
Exemple #6
0
        public static void AddVoucher(int ClientID, int SesonID, int TurID, int Years)
        {
            DataSet ds = OleDbHelper.fill("select * from Voucher", "Voucher");

            DataRow dr = ds.Tables["Voucher"].NewRow();

            dr["ClientID"] = ClientID;
            dr["SesonID"]  = SesonID;
            dr["TurID"]    = TurID;
            dr["Years"]    = Years;

            // הוספת הרשומה/שורה ל
            // DATASET
            ds.Tables["Voucher"].Rows.Add(dr);
            // עידכון מסד הנתונים
            OleDbHelper.update(ds, "select * from Voucher", "Voucher");
        }
Exemple #7
0
        /// <summary>
        /// הוספת לקחות לטבלת התלמידים
        /// </summary>
        /// <param name="cName"></param>
        /// <param Surname="cSurName"></param>

        public static void AddClient(string cName, string cSurName, string email, string cNumTD, string cCiti)
        {
            DataSet ds = OleDbHelper.fill("select * from Client", "Client");

            DataRow dr = ds.Tables["Client"].NewRow();

            dr["ClientName"]    = cName;
            dr["ClientSurname"] = cSurName;
            dr["Email"]         = email;
            dr["NumberTD"]      = cNumTD;
            dr["City"]          = cCiti;

            // הוספת הרשומה/שורה ל
            // DATASET
            ds.Tables["Client"].Rows.Add(dr);
            // עידכון מסד הנתונים
            OleDbHelper.update(ds, "select * from Client", "Client");
        }