public void load() { //groupBox_LichHen.Text = "Lịch hẹn ngày: " + DateTime.Now.ToString("dd/MM/yyyy"); this.Close(); BL.bl_ThemLichHen bl = new BL.bl_ThemLichHen(); gv_LichHen.DataSource = bl.GetLichHen(DateTime.Now.Date); frm_Main m = new frm_Main(); m.Show(); // this.Show(); }
private void button1_Click(object sender, EventArgs e) { DA.tbLICHHEN model = new DA.tbLICHHEN(); model.id_khachhang = Common.Constants.id_KhachHang; model.ngay = dateTimePicker1.Value; model.gio = comboBox1.SelectedItem.ToString(); model.ghichu = textBox1.Text; BL.bl_ThemLichHen bl = new BL.bl_ThemLichHen(); bl.ThemLichHen(model); // this.Close(); frm_Main main = new frm_Main(); main.load(); }
private void frm_Main_Load(object sender, EventArgs e) { groupBox_LichHen.Text = "Lịch hẹn ngày: " + DateTime.Now.ToString("dd/MM/yyyy"); BL.bl_ThemLichHen bl = new BL.bl_ThemLichHen(); gv_LichHen.DataSource = bl.GetLichHen(DateTime.Now.Date); }