Esempio n. 1
0
        public static List <DTO.Table> GetBanAnList(DataTable data)
        {
            List <DTO.Table> tableList = new List <DTO.Table>();

            foreach (DataRow row in data.Rows)
            {
                DTO.Table table = new DTO.Table(row);
                tableList.Add(table);
            }
            return(tableList);
        }
Esempio n. 2
0
        public List <DTO.Table> LoadTableList()
        {
            List <DTO.Table> tableList = new List <DTO.Table>();
            DataTable        data      = DAO.DataProvider.Instance.ExecuteQuery("USP_GetTableList");

            foreach (DataRow item in data.Rows)
            {
                DTO.Table table = new DTO.Table(item);
                tableList.Add(table);
            }
            return(tableList);
        }
Esempio n. 3
0
        public List <DTO.Table> GetTableList()
        {
            List <DTO.Table> tableList = new List <DTO.Table>();
            string           query     = "select * from dbo.TableFood";
            DataTable        data      = DataProvider.Instance.ExecuteQuery(query);

            foreach (DataRow item in data.Rows)
            {
                DTO.Table table = new DTO.Table(item);
                tableList.Add(table);
            }

            return(tableList);
        }
Esempio n. 4
0
        public List <DTO.Table> SearchTableByName(string name)
        {
            List <DTO.Table> tableList = new List <DTO.Table>();
            string           query     = string.Format("SELECT * FROM dbo.TableFood WHERE dbo.fuConvertToUnsign1(name) LIKE N'%' + dbo.fuConvertToUnsign1(N'{0}') + '%'", name);

            DataTable data = DataProvider.Instance.ExecuteQuery(query);

            foreach (DataRow item in data.Rows)
            {
                DTO.Table table = new DTO.Table(item);
                tableList.Add(table);
            }

            return(tableList);
        }
Esempio n. 5
0
        public Table GetTableByID(int id)
        {
            DTO.Table table = null;

            string query = "select * from TableFood where id =  " + id;

            DataTable data = DataProvider.Instance.ExecuteQuery(query);

            foreach (DataRow item in data.Rows)
            {
                table = new DTO.Table(item);
                return(table);
            }
            return(table);
        }
Esempio n. 6
0
        private void Bi_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt16((sender as ButtonImage1).TextButton);

            DTO.Table tbshow = null;
            foreach (DTO.Table tb in lstTable)
            {
                if (tb.Id == id)
                {
                    tbshow = tb;
                    break;
                }
            }
            MessageBox.Show("Table      No." + tbshow.Id + "\nFloor      : " + tbshow.Floor + "\nPosition : " + tbshow.Position, "Infomation Table", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }