Esempio n. 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");
            }
        }
Esempio n. 2
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");
            }
        }
Esempio n. 3
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");
            }
        }
Esempio n. 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");
        }
Esempio n. 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");
        }
Esempio n. 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");
        }
Esempio n. 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");
        }
Esempio n. 8
0
 public static DataSet GetVoucherClientYear(int idclient, int year)
 {
     return(OleDbHelper.fill("select * from Voucher where ClientID=" + idclient + "and Years=" + year, "Voucher"));
 }
Esempio n. 9
0
 public static DataSet GetClientVoucher(int idclient)
 {
     return(OleDbHelper.fill("select * from Voucher where ClientID=" + idclient, "Voucher"));
 }
Esempio n. 10
0
 public static DataSet Getcount()
 {
     return(OleDbHelper.fill("select count(*) from Voucher", "Voucher"));
 }
Esempio n. 11
0
 public static DataSet GetAll_Viev()
 {
     return(OleDbHelper.fill("select V.VoucherID, C.ClientSurname,S.SesonName,T.TurName,V.Years from Client C, Voucher V,Sesons S,Tur T where C.ClientID=V.ClientID and S.SesonID=V.SesonID and T.TurID=V.TurID", "Voucher"));
 }
Esempio n. 12
0
 public static DataSet GetAll()
 {
     return(OleDbHelper.fill("select * from Voucher", "Voucher"));
 }
Esempio n. 13
0
 public static DataSet GetContinent_ID(string cont)
 {
     return(OleDbHelper.fill("select * from Direction where Continent='" + cont + "'", "Direction"));
 }
Esempio n. 14
0
 public static DataSet GetSesonName(int sesonID)
 {
     return(OleDbHelper.fill("select * from Sesons where SesonID=" + sesonID, "Sesons"));
 }
Esempio n. 15
0
 public static DataSet GetLogPas(string login, int password)
 {
     return(OleDbHelper.fill("select * from LogPas where Login='******' and Password ="******"LogPas"));//
 }
Esempio n. 16
0
 public static DataSet GetPayment(int voucherID)
 {
     return(OleDbHelper.fill(string.Format("select * from Payment where VoucherID= {0}", voucherID), "Payment"));
 }
Esempio n. 17
0
 public static DataSet GetClientName(int clientID)
 {
     return(OleDbHelper.fill("select * from Client where ClientID=" + clientID, "Client"));
 }
Esempio n. 18
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="surname"></param>
 /// <returns>DataSet</returns>
 public static DataSet GetClientID(string surname)
 {
     return(OleDbHelper.fill(string.Format("select * from Client where ClientSurname='{0}'", surname), "Client"));
 }
Esempio n. 19
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public static DataSet GetAll()
 {
     return(OleDbHelper.fill("select * from Client", "Client"));
 }
Esempio n. 20
0
 public static DataSet GetVoucherClientDirection(int idclient, int direction)
 {
     return(OleDbHelper.fill("select * from Voucher where ClientID=" + idclient + "and Years=" + direction, "Voucher"));
 }
Esempio n. 21
0
 public static DataSet GetSeson_ID(string seson)
 {
     return(OleDbHelper.fill("select * from Sesons where SesonName='" + seson + "'", "Sesons"));
 }
Esempio n. 22
0
 public static DataSet Getcount()
 {
     return(OleDbHelper.fill("select count(*) from Client", "Client"));
 }
Esempio n. 23
0
 public static DataSet GetContinent(int directID)
 {
     return(OleDbHelper.fill(string.Format("select * from Direction where DirectionID={0}", directID), "Direction"));
 }