protected void FillGridData() { DataTable dt = new DataTable(); dt = clsobj.GetAgents(); // DataTable dt = mlsClient.GetAllFeatures(); //DataView dv = dt.DefaultView; //if (strSortExpression != "" && strSortDirection != "") //{ // dv.Sort = strSortExpression + " " + strSortDirection; //} if (dt.Rows.Count > 0) { grdAgents.DataSource = dt; grdAgents.DataBind(); grdAgents.PageIndex = intPageIndex; } else { btnDelete.Visible = false; grdAgents.EmptyDataText = "Agents not available yet!!!"; } //grdAgents.DataSource = dt; //grdAgents.EmptyDataText = "no Testimonials added yet! Click to create Testimonials"; //grdAgents.DataBind(); //if (intPageIndex != 0) }
protected void GetSiteData() { try { DataTable dt = new DataTable(); dt = clsobj.GetAgents(); if (dt.Rows.Count > 0) { txtFirstname.Text = Convert.ToString(dt.Rows[0]["FirstName"]); txtLastName.Text = Convert.ToString(dt.Rows[0]["LastName"]); txtEamil.Text = Convert.ToString(dt.Rows[0]["Eamil"]); txtAddress.Text = Convert.ToString(dt.Rows[0]["Address"]); txtCity.Text = Convert.ToString(dt.Rows[0]["City"]); txtState.Text = Convert.ToString(dt.Rows[0]["State"]); txtPhoneNumber.Text = Convert.ToString(dt.Rows[0]["PhoneNumber"]); txtfax.Text = Convert.ToString(dt.Rows[0]["Fax"]); txtSiteUrl.Text = Convert.ToString(dt.Rows[0]["SiteUrl"]); txtcompany.Text = Convert.ToString(dt.Rows[0]["Company"]); txtpostal.Text = Convert.ToString(dt.Rows[0]["Company"]); } } catch (Exception ex) { throw ex; } }
protected void FillGridData() { try { DataTable dt = new DataTable(); dt = clsobj.GetAgents(); if (dt.Rows.Count > 0) { grdBanfdsfsnerShow.DataSource = dt; grdBanfdsfsnerShow.DataBind(); divcominr.Visible = false; } else { divcominr.Visible = true; } } catch (Exception ex) { throw ex; } }