Beispiel #1
0
        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>());
            }
        }
Beispiel #2
0
        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());
            }
        }
Beispiel #3
0
        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());
            }
        }