Exemple #1
0
        public bool add_Order(String maDH, String maNV, String tenKH, String sdt, String tinh, String huyen, String chiTiet, String moTa, String tienHang, String phiShip, String shipper)
        {
            String lenh_1 = "insert into DONHANG values(" + maDH + "," + maNV + ",N'" + tenKH + "',N'" + sdt + "',N'" + tinh + "',N'" + huyen + "',N'" + chiTiet + "',N'" + moTa + "'," + tienHang.ToString() + "," + phiShip.ToString() + ",N'" + shipper + "')";
            bool   re     = false;

            if (XuLy.ExecuteNonQuery(lenh_1) > 0)
            {
                re = true;
            }
            return(re);
        }
Exemple #2
0
        public bool ToFix(String maShipper, String tenShipper, bool gioiTinh, String email, String ngaySinh, String sdt, String khuVuc, String trangThai)
        {
            String lenh3 = "update SHIPPER set TenShipper = N'" + tenShipper + "', GioiTinh = " + gioiTinh + ", Email = N'" + email + "', Ngaysinh = N'" + ngaySinh + "', SDT = N'" + sdt + "', KhuVucPhuTrach = N'" + khuVuc + "', TrangThai = " + trangThai;
            bool   re    = false;

            if (XuLy.ExecuteNonQuery(lenh3) > 0)
            {
                re = true;
            }
            return(re);
        }
Exemple #3
0
        public bool Add_Shipper(String maShipper, String tenShipper, String gioiTinh, String email, String ngaySinh, String sdt, String khuVuc, String trangThai)
        {
            String lenh1 = "insert into SHIPPER(MaShipper,TenShipper,GioiTinh,Email,NgaySinh,SDT,KhuVucPhuTrach,TrangThai) values('" + maShipper + "','" + tenShipper + "'," + gioiTinh + ",'" + email + "','" + ngaySinh + "','" + sdt + "'," + khuVuc + "," + trangThai + ")";
            bool   re    = false;

            if (XuLy.ExecuteNonQuery(lenh1) > 0)
            {
                re = true;
            }
            return(re);
        }
Exemple #4
0
        public bool Delete_Shipper(String maShipper)
        {
            //luu y kiem tra neu tinh trang shipper = false thi khong duoc xoa
            String lenh2 = "delete from SHIPPER where MaShipper = '" + maShipper + "'";
            bool   re    = false;

            if (XuLy.ExecuteNonQuery(lenh2) > 0)
            {
                re = true;
            }
            return(re);
        }