Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AdvModel newBrandModel = new AdvModel();

            using (AddUpdateADFrm newBrand = new AddUpdateADFrm(MaintainType.New, newBrandModel))
            {
                var dialogResult = newBrand.ShowDialog();
                if (dialogResult == DialogResult.OK)
                {
                    InitControls();
                }
            }
        }
Пример #2
0
 private void btnUp_Click(object sender, EventArgs e)
 {
     if (this.kryptonDataGridView1.SelectedRows.Count > 0)
     {
         var advModel = this.kryptonDataGridView1.SelectedRows[0].Tag as AdvModel;
         using (AddUpdateADFrm modify = new AddUpdateADFrm(MaintainType.Update, advModel))
         {
             var dialogResult = modify.ShowDialog();
             if (dialogResult == DialogResult.OK)
             {
                 InitControls();
             }
         }
     }
 }