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"); } }
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"); } }
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"); } }
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"); }
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"); }
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"); }
/// <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"); }
public static DataSet GetVoucherClientYear(int idclient, int year) { return(OleDbHelper.fill("select * from Voucher where ClientID=" + idclient + "and Years=" + year, "Voucher")); }
public static DataSet GetClientVoucher(int idclient) { return(OleDbHelper.fill("select * from Voucher where ClientID=" + idclient, "Voucher")); }
public static DataSet Getcount() { return(OleDbHelper.fill("select count(*) from Voucher", "Voucher")); }
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")); }
public static DataSet GetAll() { return(OleDbHelper.fill("select * from Voucher", "Voucher")); }
public static DataSet GetContinent_ID(string cont) { return(OleDbHelper.fill("select * from Direction where Continent='" + cont + "'", "Direction")); }
public static DataSet GetSesonName(int sesonID) { return(OleDbHelper.fill("select * from Sesons where SesonID=" + sesonID, "Sesons")); }
public static DataSet GetLogPas(string login, int password) { return(OleDbHelper.fill("select * from LogPas where Login='******' and Password ="******"LogPas"));// }
public static DataSet GetPayment(int voucherID) { return(OleDbHelper.fill(string.Format("select * from Payment where VoucherID= {0}", voucherID), "Payment")); }
public static DataSet GetClientName(int clientID) { return(OleDbHelper.fill("select * from Client where ClientID=" + clientID, "Client")); }
/// <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")); }
/// <summary> /// /// </summary> /// <returns></returns> public static DataSet GetAll() { return(OleDbHelper.fill("select * from Client", "Client")); }
public static DataSet GetVoucherClientDirection(int idclient, int direction) { return(OleDbHelper.fill("select * from Voucher where ClientID=" + idclient + "and Years=" + direction, "Voucher")); }
public static DataSet GetSeson_ID(string seson) { return(OleDbHelper.fill("select * from Sesons where SesonName='" + seson + "'", "Sesons")); }
public static DataSet Getcount() { return(OleDbHelper.fill("select count(*) from Client", "Client")); }
public static DataSet GetContinent(int directID) { return(OleDbHelper.fill(string.Format("select * from Direction where DirectionID={0}", directID), "Direction")); }