public DataSet FetchAllProducts() { string Source = "sp_fetchProducts"; try { Object[] param = null; return(MySQLCommands.Instance().ExecuteQuery(Source, CommandType.StoredProcedure, param)); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public DataSet GetMenu() { string Source = "sp_getMenu"; try { DataSet output = MySQLCommands.Instance().ExecuteQuery(Source, CommandType.StoredProcedure, null); return(output); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public static DataSet GetDatasetOfProvinces() { try { List <IProvince> ProvinceList = new List <IProvince>(); string Source = "sp_getProvinceList"; Object[] paramToken = null; DataSet OutputDataset = MySQLCommands.Instance().ExecuteQuery(Source, CommandType.StoredProcedure, paramToken); return(OutputDataset); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public DataSet GetTaxDetailsFromDB(int AddressID) { try { string Source = "sp_FetchTaxDetailsByAddressID"; object[] parameters = { new MySqlParameter("@paramAddressID", AddressID) }; return(MySQLCommands.Instance().ExecuteQuery(Source, CommandType.StoredProcedure, parameters)); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public DataRow FetchAllProductByStoreID(int PBSId) { string Source = "sp_FetchProductByPBSID"; try { Object[] param = { new MySqlParameter("@paramPBSID", PBSId) }; return(MySQLCommands.Instance().ExecuteQuery(Source, CommandType.StoredProcedure, param).Tables[0].Rows[0]); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public DataSet FetchAllProducts(int ProductID) { string Source = "sp_FetchProductsByID"; try { Object[] param = { new MySqlParameter("@paramProductID", ProductID) }; return(MySQLCommands.Instance().ExecuteQuery(Source, CommandType.StoredProcedure, param)); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public string FetchStoreImageByPBSID(int PBSID) { string Source = "sp_FetchStoreLogoFromPBSID"; try { object[] param = { new MySqlParameter("@paramPBSID", PBSID) }; return(MySQLCommands.Instance().ExecuteQuery(Source, CommandType.StoredProcedure, param).Tables[0].Rows[0]["storeLogo"].ToString()); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public DataSet FetchProfile(IUserProfile UserProfileObj) { string Source = "sp_getUserProfile"; string Token = UserProfileObj.GetToken(); try { object[] parameters = { new MySqlParameter("@paramToken", Token) }; DataSet output = MySQLCommands.Instance().ExecuteQuery(Source, CommandType.StoredProcedure, parameters); return(output); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public DataSet CreateOrderID(IAddress AddressObj, ICardDetails CardObj, IUserProfile UserProfileObj) { string Source = "sp_CreateOrderID"; try { object[] paramToken = { new MySqlParameter("@aID", AddressObj.GetAddressID()), new MySqlParameter("@caID", CardObj.GetCardID()), new MySqlParameter("@paramToken", UserProfileObj.GetToken()) }; return(MySQLCommands.Instance().ExecuteQuery(Source, CommandType.StoredProcedure, paramToken)); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public void InsertValuesToDatabase(int Oid, int Pbsid, int Quantity, double Price, double TaxAmount) { string Source = "sp_insertOrderByRow"; try { object[] paramToken = { new MySqlParameter("@paramoID", Oid), new MySqlParameter("@parampbsID", Pbsid), new MySqlParameter("@paramQuantity", Quantity), new MySqlParameter("@paramPrice", Price), new MySqlParameter("@paramTaxAmount", TaxAmount) }; MySQLCommands.Instance().ExecuteQuery(Source, CommandType.StoredProcedure, paramToken); } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }
public DataSet FetchOtherStoresList(int PBSID) { string Source = "sp_FetchOtherStoresThanLowestProductStoreByPBSID"; try { object[] param = { new MySqlParameter("@paramPBSID", PBSID) }; return(MySQLCommands.Instance().ExecuteQuery(Source, CommandType.StoredProcedure, param)); } catch (MySqlException mse) { Logger.Instance().Log(Fatal.Instance(), mse); throw mse; } catch (Exception ex) { Logger.Instance().Log(Fatal.Instance(), ex); throw ex; } }