Ejemplo n.º 1
0
        private void txtsearch_TextChanged(object sender, EventArgs e)
        {
            string textsearch           = ConvertToUnSign(txtsearch.Text.ToLower());
            List <tbl_HoatDongDoan> lst = new List <tbl_HoatDongDoan>();

            lst = HoatDongDoanService.HoatDongDoan_GetByTop("", "", "");
            var v = (from p in lst
                     where ConvertToUnSign(p.TenHoatDong.ToLower()).Contains(textsearch)
                     select p).ToList();

            dtgrvHdDoan.DataSource = v;
        }
Ejemplo n.º 2
0
        private void LoadandSetData()
        {
            List <tbl_HoatDongDoan> lst = new List <tbl_HoatDongDoan>();

            lst                   = HoatDongDoanService.HoatDongDoan_GetByTop("", "", "");
            txtketqua.Text        = "";
            txtTenHD.Text         = "";
            cbbNguoiphutrach.Text = "";
            dtipThoiGian.ResetValue();
            btnthem.Enabled = true;
            btnsua.Enabled  = true;
            btnluu.Enabled  = false;
            btnhuy.Enabled  = false;

            btndelete.Enabled      = true;
            txtId.Enabled          = false;
            dtgrvHdDoan.DataSource = lst;
        }
Ejemplo n.º 3
0
        private void btnthem_Click(object sender, EventArgs e)
        {
            them = true;
            List <Entity.tbl_HoatDongDoan> lst = new List <tbl_HoatDongDoan>();

            lst = HoatDongDoanService.HoatDongDoan_GetByTop("", "", "");
            if (lst.Count != 0)
            {
                txtId.Text = (Convert.ToInt32(lst[lst.Count - 1].Id) + 1).ToString();
            }
            else
            {
                txtId.Text = "1";
            }
            btnsua.Enabled    = false;
            btndelete.Enabled = false;
            btnhuy.Enabled    = true;
            btnluu.Enabled    = true;
        }