public List <string> SelectAccouts() { try { List <string> lstAccount = new List <string>(); string strQuery = "SELECT * FROM tb_FBAccount"; DataSet ds = DataBaseHandler.SelectQuery(strQuery, "tb_FBAccount"); DataTable dt = ds.Tables["tb_FBAccount"]; foreach (DataRow row in dt.Rows) { string str = null; foreach (var item in row.ItemArray) { str = str + item.ToString() + ":"; } lstAccount.Add(str); } return(lstAccount); } catch (Exception) { return(new List <string>()); } }
public DataTable SelectSettingData() { try { string strQuery = "SELECT * FROM tb_Setting"; DataSet ds = DataBaseHandler.SelectQuery(strQuery, "tb_Setting"); DataTable dt = ds.Tables["tb_Setting"]; return(dt); } catch (Exception) { return(new DataTable()); } }
public DataTable SelectAccoutsForGridView() { try { List <string> lstAccount = new List <string>(); string strQuery = "SELECT * FROM tb_LinkedInAccount"; DataSet ds = DataBaseHandler.SelectQuery(strQuery, "tb_LinkedInAccount"); DataTable dt = ds.Tables["tb_LinkedInAccount"]; return(dt); } catch (Exception) { return(new DataTable()); } }