public bool ThemMonAn() { //Them vao co so du lieu string sql = "insert into Tb_MonAn (MaMonAn,TenMonAn,DonGia) values (@MaMA,@TenMA,@Gia)"; SqlParameter[] thamso = { new SqlParameter("@MaMA", this.maMonAn), new SqlParameter("@TenMA", this.tenMonAn), new SqlParameter("@Gia", this.DonGia) }; ConnectToDB.Truyvan_Xuly_co_Thamso(sql, thamso); return(true); }
//Them vao bang cham cong public bool ThemChamCong() { string sql = "insert into Tb_ChamCong (MaChamCong,MaNV,Thang,Nam,SoNgayNghi,SoNgayLamTre) values (@MaChamCong,@MaNV,@Thang,@Nam,@SoNgayNghi,@SoNgayLamTre)"; SqlParameter[] thamso = { new SqlParameter("@MaChamCong", this.MaChamCong), new SqlParameter("@MaNV", this.MaNV), new SqlParameter("@Thang", this.Thang), new SqlParameter("@Nam", this.Nam), new SqlParameter("@SoNgayNghi", this.SoNgayNghi), new SqlParameter("@SoNgayLamTre", this.SoNgayDiLamTre) }; ConnectToDB.Truyvan_Xuly_co_Thamso(sql, thamso); return(true); }
//Them Nhan VIen public bool ThemNhanVien() { //Them vao co so du lieu string sql = "insert into Tb_ThongTinNhanVien (MaNV,TenNV,NgaySinh,QueQuan,MaLoaiNV,DiaChi,SoDT) values (@MaNV,@TenNV,@NgaySinh,@QueQuan,@MaLoaiNV,@DiaChi,@SoDT)"; SqlParameter[] thamso = { new SqlParameter("@MaNV", this.MaNV), new SqlParameter("@TenNV", this.TenNV), new SqlParameter("@NgaySinh", this.NgaySinh), new SqlParameter("@QueQuan", this.QueQuan), new SqlParameter("@MaLoaiNV", this.MaLoaiNV), new SqlParameter("@DiaChi", this.DiaChi), new SqlParameter("@SoDT", this.SoDT) }; ConnectToDB.Truyvan_Xuly_co_Thamso(sql, thamso); return(true); }
public bool ThemKhachHang() { //Them vao co so du lieu string sql = "insert into Tb_KhachHang (MaKH,TenKH,DChi,SoDT) values (@MaKH,@TenKH,@DChi,@SoDT)"; SqlParameter[] thamso = { new SqlParameter("@MaKH", this.maKH), new SqlParameter("@TenKH", this.tenKH), new SqlParameter("@DChi", this.Dchi), new SqlParameter("@SoDT", this.SoDT) }; ConnectToDB.Truyvan_Xuly_co_Thamso(sql, thamso); return(true); }
public bool ThemVaoDonDH() { //Them vao co so du lieu string sql = "insert into Tb_DonDatHang (MaKH,NgayDat,NgayNhan,MaMonAn,SoLuong,DonGia) values (@MaKH,@NgayDat,@NgayNhan,@MaMonAn,@SoLuong,@DonGia)"; SqlParameter[] thamso = { new SqlParameter("@MaKH", this.maKH), new SqlParameter("@NgayDat", this.ngayDat), new SqlParameter("@NgayNhan", this.ngayNhan), new SqlParameter("@MaMonAn", this.maMonAn), new SqlParameter("@SoLuong", this.soLuong), new SqlParameter("@DonGia", this.donGia) }; ConnectToDB.Truyvan_Xuly_co_Thamso(sql, thamso); return(true); }