예제 #1
0
        private void loạiNhàToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormLoaiNha formLoaiNha = new FormLoaiNha();

            formLoaiNha.TopLevel        = false;
            formLoaiNha.Visible         = true;
            formLoaiNha.FormBorderStyle = FormBorderStyle.None;
            formLoaiNha.Dock            = DockStyle.Fill;
            tabCtlChinh.TabPages.Add("Loại nhà");
            tabCtlChinh.TabPages[tabCtlChinh.TabPages.Count - 1].Controls.Add(formLoaiNha);
            tabCtlChinh.SelectedIndex = tabCtlChinh.TabPages.Count - 1;
        }
예제 #2
0
        private void btnThemLoaiNha_Click(object sender, EventArgs e)
        {
            FormLoaiNha formLoaiNha = new FormLoaiNha();

            formLoaiNha.StartPosition = FormStartPosition.CenterScreen;
            if (formLoaiNha.ShowDialog(this) == DialogResult.Yes)
            {
            }
            else
            {
                cbLoaiNha.DataSource = loaiNhaBLL.LayDanhSachLoaiNha();
            }
        }