public void ThemVeDat(int idKhach) { Provider p = new Provider(); try { p.Connect(); string strSql = "sp_ThemVeMoi"; p.ExecuteNonQuery(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@IDKH", Value = idKhach }); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public void ThayTheTam(int IDVe) { Provider p = new Provider(); try { p.Connect(); string strSql = "sp_ThemTempVe"; p.ExecuteNonQuery(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@IdVe", Value = IDVe }); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public void XoaVe(int IdChuyen) { Provider p = new Provider(); try { p.Connect(); string strSql = "sp_XoaVe"; p.ExecuteNonQuery(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@IDChuyen", Value = IdChuyen }); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public void InsertGhe(DTO.Ghe ghe) { Provider p = new Provider(); try { p.Connect(); string strSql = "InsertGhe"; p.ExecuteNonQuery(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@IDGhe", Value = ghe.ID }, new SqlParameter { ParameterName = "@Dong", Value = ghe.Dong }, new SqlParameter { ParameterName = "@Cot", Value = ghe.Cot }, new SqlParameter { ParameterName = "@Tang", Value = ghe.Tang }, new SqlParameter { ParameterName = "@SoGhe", Value = ghe.SoGhe }, new SqlParameter { ParameterName = "@IdXe", Value = ghe.IdXe } ); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public void Delete(string UserID) { Provider p = new Provider(); try { p.Connect(); string strSql = "DeleteUsers"; p.ExecuteNonQuery(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@UserID", Value = UserID } ); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public DataTable FillDGV(int IdLoai) { Provider p = new Provider(); try { p.Connect(); string strSql = "sp_FillXe"; DataTable dt = p.Select(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@IdLoai", Value = IdLoai }); return(dt); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public void Delete_Tram(int ID_Tram) { Provider p = new Provider(); try { p.Connect(); string strSql = "sp_XoaTram"; p.ExecuteNonQuery(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@ID", Value = ID_Tram } ); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public DataTable TimKiemTaiXe(string hoTen) { Provider p = new Provider(); try { p.Connect(); string strSql = "sp_TimKiemTaiXe"; DataTable dt = p.Select(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@TenTaiXe", Value = hoTen }); return(dt); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public void XoaTaiXe(int id) { Provider p = new Provider(); try { p.Connect(); string strSql = "sp_XoaTaiXe"; DataTable dt = p.Select(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@ID", Value = id } ); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public DataTable FillNgayKhoiHanh(int IDTuyen) { Provider p = new Provider(); try { p.Connect(); string strSql = "sp_FillNgayKhoiHanh"; DataTable dt = p.Select(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@IdTuyen", Value = IDTuyen }); return(dt); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public DataTable FillListViewQuyen(string userid) { Provider p = new Provider(); try { p.Connect(); string strSql = "FillCbbQuyen"; DataTable dt = p.Select(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@UserID", Value = userid } ); return(dt); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public DataTable FillDgvVeDatKH(int MaKH) { Provider p = new Provider(); try { p.Connect(); string strSql = "sp_FindVeByKhachHang"; DataTable dt = p.Select(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@IdKH", Value = MaKH } ); return(dt); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public DataTable FillDgvVeDatLai(int MaChuyen) { Provider p = new Provider(); try { p.Connect(); string strSql = "sp_FillDGvVeDat"; DataTable dt = p.Select(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@MaChuyen", Value = MaChuyen } ); return(dt); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }
public DataTable Fill_ReportChuyenTrongVe(int Thang) { Provider p = new Provider(); try { p.Connect(); string strSql = "sp_FillReportChuyenTrongVe"; DataTable dt = p.Select(CommandType.StoredProcedure, strSql, new SqlParameter { ParameterName = "@Thang", Value = Thang } ); return(dt); } catch (SqlException ex) { throw ex; } finally { p.Disconnect(); } }