private void btnAdd_Click(object sender, System.EventArgs e) { frmDataEditItems f = new frmDataEditItems(); f.ShowDialog(); ReadDatas(); }
private void btnEdit_Click(object sender, System.EventArgs e) { try { if (NoRecordDataGrid()) { return; } int row = dataGrid1.CurrentCell.RowNumber; int col = 1; string Name = dataGrid1[row, col].ToString().Trim(); string wValue = dataGrid1[row, 3].ToString().Trim(); DateTime dt = DateTime.Parse(dataGrid1[row, 7].ToString().Trim()); string wLL = dataGrid1[row, 2].ToString().Trim(); string editID = dataGrid1[row, 0].ToString().Trim(); frmDataEditItems f = new frmDataEditItems(Name, wValue, dt, wLL, editID); f.ShowDialog(); ReadDatas(); } catch { } }
private void btnAdd_Click(object sender, System.EventArgs e) { frmDataEditItems f=new frmDataEditItems(); f.ShowDialog(); ReadDatas(); }
private void btnEdit_Click(object sender, System.EventArgs e) { try { if(NoRecordDataGrid()) {return;} int row=dataGrid1.CurrentCell.RowNumber; int col=1; string Name=dataGrid1[row,col].ToString().Trim(); string wValue=dataGrid1[row,3].ToString().Trim(); DateTime dt=DateTime.Parse(dataGrid1[row,7].ToString().Trim()); string wLL=dataGrid1[row,2].ToString().Trim(); string editID=dataGrid1[row,0].ToString().Trim(); frmDataEditItems f=new frmDataEditItems(Name,wValue,dt,wLL,editID); f.ShowDialog(); ReadDatas(); } catch { } }