示例#1
0
        public List <LSach> LoadSachList()
        {
            List <LSach> LSachList = new List <LSach>();
            DataTable    data      = DataProvider.Instance.ExecuteQuery("select * from LSach");

            foreach (DataRow item in data.Rows)
            {
                LSach lsach = new LSach(item);
                LSachList.Add(lsach);
            }
            return(LSachList);
        }
示例#2
0
        public List <LSach> LoadSachListWhereMaS(string maS)
        {
            List <LSach> LSachList = new List <LSach>();
            DataTable    data      = DataProvider.Instance.ExecuteQuery("select ls.MaLSach, ls.TenLSach from LSach as ls, Sach as s where s.MaLSach= ls.MaLSach and s.MaSach='" + maS + "'");

            foreach (DataRow item in data.Rows)
            {
                LSach lsach = new LSach(item);
                LSachList.Add(lsach);
            }
            return(LSachList);
        }
示例#3
0
        private void cbbLSach_SelectedIndexChanged(object sender, EventArgs e)
        {
            string   Ma = "";
            ComboBox cb = sender as ComboBox;

            if (cb.SelectedItem == null)
            {
                return;
            }
            LSach select = cb.SelectedItem as LSach;

            Ma = select.MaLSach;
            ShowTextbox(Ma);
        }