private void sbAdd_Click(object sender, EventArgs e) { frmEditAbstract myEditAbstract = new frmEditAbstract(); if (myEditAbstract.ShowDialog() == DialogResult.OK) { DataRow drTmp = gvType.GetDataRow(gvType.FocusedRowHandle); BindSlaver(drTmp["F_Name"].ToString()); } myEditAbstract.Dispose(); }
private void sbModi_Click(object sender, EventArgs e) { if (gvAbstract.FocusedRowHandle < 0) { return; } DataRow dr = gvAbstract.GetDataRow(gvAbstract.FocusedRowHandle); frmEditAbstract myEditAbstract = new frmEditAbstract(); myEditAbstract.bFlag = true; myEditAbstract.sName = dr["F_Remark"].ToString(); myEditAbstract.sType = dr["F_Type"].ToString(); myEditAbstract.Aid = Convert.ToDecimal(dr["Aid"]); if (myEditAbstract.ShowDialog() == DialogResult.OK) { DataRow drTmp = gvType.GetDataRow(gvType.FocusedRowHandle); BindSlaver(drTmp["F_Name"].ToString()); } myEditAbstract.Dispose(); }