public bool addproduct(Products pd) { db = new Cusdb(); return(db.addproduct(pd)); }
public bool updateproduct(Products pd) { db = new Cusdb(); string newFileName = Guid.NewGuid() + Path.GetExtension(pd.path); System.IO.File.Copy(pd.path, dir + newFileName, true); pd.path = newFileName; return(db.updateproduct(pd)); }
public System.Data.DataTable getuiTable(string type) { db = new Cusdb(); System.Data.DataTable data = db.getuitable(type); foreach (DataRow datarow in data.Rows) { if (File.Exists(dir + datarow["Path"].ToString())) { FileStream fs = new FileStream(dir + datarow["Path"].ToString(), FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fs); datarow["Image"] = br.ReadBytes((int)fs.Length); fs.Close(); } } data.Columns.Remove("Path"); return(data); }
public void updatent(Order od) { db = new Cusdb(); db.updatent(od); }
public bool deletestaff(Staff st) { db = new Cusdb(); return(db.deletestaff(st)); }
public bool addstaff(Staff st) { db = new Cusdb(); return(db.add(st)); }
public object login(user us) { db = new Cusdb(); return(db.login(us)); }
public void updaterec(Products pd, int total) { db = new Cusdb(); db.updaterec(pd, total); }
public object stafflogin(Staff st) { db = new Cusdb(); return(db.stafflogin(st)); }
public string gettotal() { db = new Cusdb(); return(db.gettotal()); }
public bool cashout(int total) { db = new Cusdb(); return(db.cashout(total)); }
public object gescTable() { db = new Cusdb(); return(db.getsctable()); }
public bool genorder(user us) { db = new Cusdb(); return(db.genorder(us)); }
public bool addtochart(Products pd, user us) { db = new Cusdb(); return(db.addtochart(pd, us)); }
public bool add(user us) { // string pattern = "^([0-9a-zA-Z]([-\\.\\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\\w]*[0-9a-zA-Z]\\.)+[a-zA-Z]{2,9})$"; db = new Cusdb(); return(db.add(us)); }
public object getsphistoryTable(Staff st) { db = new Cusdb(); return(db.getsphistoryTable(st)); }
public void updaterec2() { db = new Cusdb(); db.updaterec2(); }
public System.Data.DataTable getekkenTable(Staff st) { db = new Cusdb(); return(db.gettekkentable(st)); }
public bool adminlogin(admin ad) { db = new Cusdb(); return(db.adminlogin(ad)); }
public object historyTable(Staff st) { db = new Cusdb(); return(db.historytable(st)); }
public object search(Products pd) { db = new Cusdb(); return(db.serach(pd)); }
public void perup(Order od) { db = new Cusdb(); db.perup(od); }
public bool deleteproduct(Products pd) { db = new Cusdb(); return(db.deleteproduct(pd)); }
public System.Data.DataTable gettrTable(user us) { db = new Cusdb(); return(db.gettrtable(us)); }
public object search(Staff st) { db = new Cusdb(); return(db.serach(st)); }
public System.Data.DataTable getntTable() { db = new Cusdb(); return(db.getnttable()); }
public bool updatestaff(Staff st) { db = new Cusdb(); return(db.updatestaff(st)); }
public System.Data.DataTable getTable() { //throw new NotImplementedException(); db = new Cusdb(); return(db.gettable()); }