Esempio n. 1
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnWellEdit_Click(object sender, EventArgs e)
        {
            tblWell well = GetSelectedWell();

            if (well != null)
            {
                int rowIndex = dgvWell.CurrentRow.Index;
                frmWellItem f = new frmWellItem(GetDB(), well);
                if (f.ShowDialog() == DialogResult.OK)
                {
                    // refresh
                    //
                    RefreshWell();
                    this.dgvWell.CurrentCell = this.dgvWell[0, rowIndex];
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnWellAdd_Click(object sender, EventArgs e)
        {
            frmWellItem f = new frmWellItem(GetDB());
            if (f.ShowDialog() == DialogResult.OK)
            {
                GetGwl().tblWell.Add(f.GetWell());

                // refresh well source
                //
                RefreshWell();

                this.dgvWell.CurrentCell = this.dgvWell[0, this.dgvWell.Rows.Count - 1];
            }
        }