Example #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();
        }
Example #2
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();
     
 }
Example #3
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();
        }
Example #4
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();
        }