コード例 #1
0
 /// <summary>
 /// Handles the Click event of the btnInsert control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void btnInsert_Click(object sender, EventArgs e)
 {
     var frmedit = new FrmMedicinEdit();
     frmedit.ShowDialog();
     FillToGrid();
     
 }
コード例 #2
0
        /// <summary>
        /// Handles the Click event of the btnEdit control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnEdit_Click(object sender, EventArgs e)
        {
            this.bdsDefine.EndEdit();
            var medicine = (Medicine) this.bdsMedicines.Current;
            if (medicine == null) return;

            var frmedit = new FrmMedicinEdit(medicine.Id);
            frmedit.ShowDialog();
            FillToGrid();
        }