private void địaỐcToolStripMenuItem1_Click(object sender, EventArgs e) { FormDiaOc formDiaOc = new FormDiaOc(); formDiaOc.TopLevel = false; formDiaOc.Visible = true; formDiaOc.FormBorderStyle = FormBorderStyle.None; formDiaOc.Dock = DockStyle.Fill; tabCtlChinh.TabPages.Add("Địa ốc"); tabCtlChinh.TabPages[tabCtlChinh.TabPages.Count - 1].Controls.Add(formDiaOc); tabCtlChinh.SelectedIndex = tabCtlChinh.TabPages.Count - 1; }
private void btnThemDiaOc_Click(object sender, EventArgs e) { FormDiaOc diaglogDiaOc = new FormDiaOc(); diaglogDiaOc.StartPosition = FormStartPosition.CenterScreen; if (diaglogDiaOc.ShowDialog(this) == DialogResult.Yes) { } else { cbDiaOc.DataSource = diaOcBLL.LayDanhSachDiaOcTheoMaKH(Int32.Parse(cbKhachHang.SelectedValue.ToString())); } }
private void btnQuanLyDiaOc_Click(object sender, EventArgs e) { if (id != "") { FormDiaOc diaglogDiaOc = new FormDiaOc(Int32.Parse(txtMaKH.Text.ToString())); diaglogDiaOc.StartPosition = FormStartPosition.CenterScreen; if (diaglogDiaOc.ShowDialog(this) == DialogResult.Yes) { } else { // txtSoLuongQuangCao.Text = chiTietQuangCaoBLL.LayDanhSachChiTietQuangCaoTheoMaPhieuDangKy(Int32.Parse(txtMaPhieuDangKy.Text)).Rows.Count.ToString(); } } else { MessageBox.Show("Vui lòng chọn Khách hàng muốn thêm địa ốc!"); } }