Exemplo n.º 1
0
        private void btnTonGiao_Click(object sender, EventArgs e)
        {
            FrmTonGiao f = new FrmTonGiao();

            AddNewTab(f, 6);
            f.setTab(clstab.current());
            f.change = new ChangeStateButton(changeButton);
            f.ShowEditAnDeleteButton();
        }
 private void btnThemTG_Click(object sender, EventArgs e)
 {
     if (tab.action != ActionForm.KHONG)
     {
         FrmTonGiao frm = new FrmTonGiao(((DataItem)cbbTonGiao.SelectedItem).Value);
         if (frm.ShowDialog() == DialogResult.Cancel)
         {
             if (frm.isChangeData)
             {
                 UpdatecbbTonGiao(frm.CurrentRowSelected);
             }
             else
             {
                 if (frm.CurrentRowSelected != null)
                 {
                     cbbTonGiao.SelectedValue = frm.CurrentRowSelected;
                 }
             }
         }
     }
 }