Exemple #1
0
        public bool addproduct(Products pd)
        {
            db = new Cusdb();


            return(db.addproduct(pd));
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        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);
        }
Exemple #4
0
 public void updatent(Order od)
 {
     db = new Cusdb();  db.updatent(od);
 }
Exemple #5
0
 public bool deletestaff(Staff st)
 {
     db = new Cusdb();
     return(db.deletestaff(st));
 }
Exemple #6
0
 public bool addstaff(Staff st)
 {
     db = new Cusdb();
     return(db.add(st));
 }
Exemple #7
0
 public object login(user us)
 {
     db = new Cusdb();
     return(db.login(us));
 }
Exemple #8
0
 public void updaterec(Products pd, int total)
 {
     db = new Cusdb();
     db.updaterec(pd, total);
 }
Exemple #9
0
 public object stafflogin(Staff st)
 {
     db = new Cusdb();
     return(db.stafflogin(st));
 }
Exemple #10
0
 public string gettotal()
 {
     db = new Cusdb();
     return(db.gettotal());
 }
Exemple #11
0
 public bool cashout(int total)
 {
     db = new Cusdb();
     return(db.cashout(total));
 }
Exemple #12
0
 public object gescTable()
 {
     db = new Cusdb();
     return(db.getsctable());
 }
Exemple #13
0
 public bool genorder(user us)
 {
     db = new Cusdb();
     return(db.genorder(us));
 }
Exemple #14
0
 public bool addtochart(Products pd, user us)
 {
     db = new Cusdb();
     return(db.addtochart(pd, us));
 }
Exemple #15
0
 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));
 }
Exemple #16
0
 public object getsphistoryTable(Staff st)
 {
     db = new Cusdb();
     return(db.getsphistoryTable(st));
 }
Exemple #17
0
 public void updaterec2()
 {
     db = new Cusdb(); db.updaterec2();
 }
Exemple #18
0
 public System.Data.DataTable getekkenTable(Staff st)
 {
     db = new Cusdb();
     return(db.gettekkentable(st));
 }
Exemple #19
0
 public bool adminlogin(admin ad)
 {
     db = new Cusdb();
     return(db.adminlogin(ad));
 }
Exemple #20
0
 public object historyTable(Staff st)
 {
     db = new Cusdb();
     return(db.historytable(st));
 }
Exemple #21
0
        public object search(Products pd)
        {
            db = new Cusdb();

            return(db.serach(pd));
        }
Exemple #22
0
 public void perup(Order od)
 {
     db = new Cusdb();
     db.perup(od);
 }
Exemple #23
0
 public bool deleteproduct(Products pd)
 {
     db = new Cusdb();
     return(db.deleteproduct(pd));
 }
Exemple #24
0
 public System.Data.DataTable gettrTable(user us)
 {
     db = new Cusdb(); return(db.gettrtable(us));
 }
Exemple #25
0
 public object search(Staff st)
 {
     db = new Cusdb();
     return(db.serach(st));
 }
Exemple #26
0
 public System.Data.DataTable getntTable()
 {
     db = new Cusdb(); return(db.getnttable());
 }
Exemple #27
0
 public bool updatestaff(Staff st)
 {
     db = new Cusdb();
     return(db.updatestaff(st));
 }
Exemple #28
0
 public System.Data.DataTable getTable()
 {
     //throw new NotImplementedException();
     db = new Cusdb();
     return(db.gettable());
 }