コード例 #1
0
ファイル: Client.cs プロジェクト: Andreiiy/Travel_agent
        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");
            }
        }
コード例 #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");
            }
        }
コード例 #3
0
ファイル: Voucher.cs プロジェクト: Andreiiy/Travel_agent
        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");
            }
        }
コード例 #4
0
ファイル: LogPas.cs プロジェクト: Andreiiy/Travel_agent
        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");
        }
コード例 #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");
        }
コード例 #6
0
ファイル: Voucher.cs プロジェクト: Andreiiy/Travel_agent
        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");
        }
コード例 #7
0
ファイル: Client.cs プロジェクト: Andreiiy/Travel_agent
        /// <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");
        }
コード例 #8
0
ファイル: Voucher.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet GetVoucherClientYear(int idclient, int year)
 {
     return(OleDbHelper.fill("select * from Voucher where ClientID=" + idclient + "and Years=" + year, "Voucher"));
 }
コード例 #9
0
ファイル: Voucher.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet GetClientVoucher(int idclient)
 {
     return(OleDbHelper.fill("select * from Voucher where ClientID=" + idclient, "Voucher"));
 }
コード例 #10
0
ファイル: Voucher.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet Getcount()
 {
     return(OleDbHelper.fill("select count(*) from Voucher", "Voucher"));
 }
コード例 #11
0
ファイル: Voucher.cs プロジェクト: Andreiiy/Travel_agent
 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"));
 }
コード例 #12
0
ファイル: Voucher.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet GetAll()
 {
     return(OleDbHelper.fill("select * from Voucher", "Voucher"));
 }
コード例 #13
0
ファイル: Direction.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet GetContinent_ID(string cont)
 {
     return(OleDbHelper.fill("select * from Direction where Continent='" + cont + "'", "Direction"));
 }
コード例 #14
0
ファイル: Sesons.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet GetSesonName(int sesonID)
 {
     return(OleDbHelper.fill("select * from Sesons where SesonID=" + sesonID, "Sesons"));
 }
コード例 #15
0
ファイル: LogPas.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet GetLogPas(string login, int password)
 {
     return(OleDbHelper.fill("select * from LogPas where Login='******' and Password ="******"LogPas"));//
 }
コード例 #16
0
 public static DataSet GetPayment(int voucherID)
 {
     return(OleDbHelper.fill(string.Format("select * from Payment where VoucherID= {0}", voucherID), "Payment"));
 }
コード例 #17
0
ファイル: Client.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet GetClientName(int clientID)
 {
     return(OleDbHelper.fill("select * from Client where ClientID=" + clientID, "Client"));
 }
コード例 #18
0
ファイル: Client.cs プロジェクト: Andreiiy/Travel_agent
 /// <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"));
 }
コード例 #19
0
ファイル: Client.cs プロジェクト: Andreiiy/Travel_agent
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public static DataSet GetAll()
 {
     return(OleDbHelper.fill("select * from Client", "Client"));
 }
コード例 #20
0
ファイル: Voucher.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet GetVoucherClientDirection(int idclient, int direction)
 {
     return(OleDbHelper.fill("select * from Voucher where ClientID=" + idclient + "and Years=" + direction, "Voucher"));
 }
コード例 #21
0
ファイル: Sesons.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet GetSeson_ID(string seson)
 {
     return(OleDbHelper.fill("select * from Sesons where SesonName='" + seson + "'", "Sesons"));
 }
コード例 #22
0
ファイル: Client.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet Getcount()
 {
     return(OleDbHelper.fill("select count(*) from Client", "Client"));
 }
コード例 #23
0
ファイル: Direction.cs プロジェクト: Andreiiy/Travel_agent
 public static DataSet GetContinent(int directID)
 {
     return(OleDbHelper.fill(string.Format("select * from Direction where DirectionID={0}", directID), "Direction"));
 }