private void newbttn_Click(object sender, EventArgs e) { string newfileno = idincrement(getlastfileno()); insertinto_table(newfileno); using (NewEviction itemInfo = new NewEviction())//Open main form and hide login form { itemInfo.getfileno(newfileno); itemInfo.ShowDialog(); itemInfo.Dispose(); Showallitems(); } }
private void evictionsdatagrid_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { string filenumber; if (evictionsdatagrid.SelectedRows.Count == 1) { int selectedrowindex = evictionsdatagrid.SelectedCells[0].RowIndex; DataGridViewRow slectedrow = evictionsdatagrid.Rows[selectedrowindex]; filenumber = Convert.ToString(slectedrow.Cells[0].Value); using (NewEviction itemInfo = new NewEviction())//Open main form and hide login form { itemInfo.getfileno(filenumber); itemInfo.ShowDialog(); itemInfo.Dispose(); Showallitems(); } } }