public void finish() { bool flagSave = false; // Kiểm tra dữ liệu vào hợp lệ if (CheckDataInput()) { if (person == null) { flagSave = PatientModelManage.Instance.CreatePerson(GetData()); } else { flagSave = PatientModelManage.Instance.UpdatePerson(GetData()); } if (flagSave) { PanelListPatient.RefeshDataTable(null); ResetGui(); SetEnableComponents(true); } } if (!flagSave) { MessageBoxEX.DialogMessageBox("Thông báo", "Lưu không thành công", "Chưa thực hiện được thao tác này. \n Vui lòng kiểm tra lại dữ liệu hoặc thao tác của bạn!"); } }
/** * Properties **/ public FormMain() { InitializeComponent(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain)); this.lblNaviBar1.Image = UtilImage.ResizeImage(global::ManageSoftware.Properties.Resources.button_menu_2, 120, 34); this.lblNaviBar2.Image = UtilImage.ResizeImage(global::ManageSoftware.Properties.Resources.button_menu_2, 120, 34); this.lblNaviBar3.Image = UtilImage.ResizeImage(global::ManageSoftware.Properties.Resources.button_menu_2, 120, 34); panelHome = new PanelHome(); panelListPatient = new PanelListPatient(); panelListPatient.DisplayPanelEvent += new DisplayPanelHander(DisplayPanel); panelMain.SuspendLayout(); panelMain.Controls.Add(panelHome); panelMain.Controls.Add(panelListPatient); panelMain.ResumeLayout(); panelHome.Hide(); panelListPatient.Show(); panelMain.Name = typeof(PanelListPatient).Name; }