Example #1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            //frmConfirmationTemplates frm = new frmConfirmationTemplates(new Models.Templates(), Models.MethodType.Add);
            //frm.ShowDialog();
            //Init();
            //    frmAddEditTemplateV2 frm = new frmAddEditTemplateV2();
            //    frm.ShowDialog();
            frmAddEditTemplatesV2 frm = new frmAddEditTemplatesV2(new Templates()
            {
            }, MethodType.Add);

            frm.ShowDialog();
            Init();
        }
Example #2
0
 private void BtnEditRepo_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
 {
     try
     {
         if (TemplateGridView.GetFocusedRow() is Templates item)
         {
             frmAddEditTemplatesV2 frm = new frmAddEditTemplatesV2(item, MethodType.Edit);
             frm.ShowDialog();
             Init();
         }
     }
     catch (Exception exception)
     {
         MessageBox.Show(exception.Message, exception.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }