public void fillEditFormO() { ClearO(); DataSet ds = G_GetPass.GetDispatchEmail(Convert.ToInt32(txtDocIdEdit.Text.Trim()), "O", Convert.ToInt32(strFY)); gvOL.DataSource = ds; gvOL.DataBind(); for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++) { if (ds.Tables[0].Rows[i]["EmailID"].ToString() == "") { Save.Visible = false; } else { Save.Visible = true; } } }
public void fillEditFormL() { ClearL(); DataSet ds = G_GetPass.GetDispatchEmail(Convert.ToInt32(txtDocIdEdit.Text.Trim()), "L", Convert.ToInt32(strFY)); DataTable dt = ds.Tables[0]; for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++) { //changed from table 0 to table 1 if (ds.Tables[1].Rows[i]["EmailID"].ToString() == "") { Save.Visible = false; } else { Save.Visible = true; } } filltempData(ds.Tables[1]); }