Esempio n. 1
0
        /// <summary>
        /// The edit current row.
        /// </summary>
        private void EditCurrentRow()
        {
            var selectedRows = this.grdViewMain.GetSelectedRows();

            if (selectedRows.Length == 0)
            {
                return;
            }

            var frmEditMediaPath = new FrmEditMediaPath(
                FrmEditMediaPath.MediaPathActionType.Edit, 
                this.grdViewMain.GetRow(selectedRows[0]) as MediaPathModel);

            frmEditMediaPath.ShowDialog(this);
        }
Esempio n. 2
0
        /// <summary>
        /// Handles the Click event of the BtnAdd 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 BtnAdd_Click(object sender, EventArgs e)
        {
            var frmEditMediaPath = new FrmEditMediaPath(FrmEditMediaPath.MediaPathActionType.Add, new MediaPathModel());
            frmEditMediaPath.ShowDialog(this);

            grdViewMain.RefreshData();
            // ButRefresh_Click(null, null);
        }