Beispiel #1
0
        private void themMayInRButton_Click(object sender, EventArgs e)
        {
            var frm = new TaoMayInForm();

            frm.TinhTrangForm = Common.Enums.TinhTrangForm.Them;
            frm.MaximizeBox   = false;
            frm.MinimizeBox   = false;
            frm.StartPosition = FormStartPosition.CenterParent;
            frm.ShowDialog();
            if (frm.DialogResult == DialogResult.OK)
            {
                DauNoiDuLieu();
            }
        }
Beispiel #2
0
 private void suaMayInRButton_Click(object sender, EventArgs e)
 {
     if (mayInRGridView.CurrentRow != null)
     {
         var model = (MayInModel)mayInRGridView.CurrentRow.DataBoundItem;
         var frm   = new TaoMayInForm();
         frm.TinhTrangForm = Common.Enums.TinhTrangForm.Sua;
         frm.MayInEdited   = model;
         frm.MaximizeBox   = false;
         frm.MinimizeBox   = false;
         frm.StartPosition = FormStartPosition.CenterParent;
         frm.ShowDialog();
         if (frm.DialogResult == DialogResult.OK)
         {
             DauNoiDuLieu();
         }
     }
 }