public void FetchFromClient(Int32 _clientNum)
 {
     Whitfieldcore _wc = new Whitfieldcore();
     IDataReader iReader = _wc.GetClientInfo(_clientNum);
     while (iReader.Read())
     {
         txttele.Text = iReader["Phone"] == DBNull.Value ? "" : iReader["Phone"].ToString();
         txtFax.Text = iReader["Fax"] == DBNull.Value ? "" : iReader["Fax"].ToString();
         txtAddress.Text = iReader["Street"] == DBNull.Value ? "" : iReader["Street"].ToString();
         String City = iReader["City"] == DBNull.Value ? "" : iReader["City"].ToString();
         ddlCity.SelectedIndex = ddlCity.Items.IndexOf(ddlCity.Items.FindByValue(City.ToString()));
         String Statecd = iReader["State"] == DBNull.Value ? "" : iReader["State"].ToString();
         ddlState.SelectedIndex = ddlState.Items.IndexOf(ddlState.Items.FindByValue(Statecd.ToString()));
         //txtzip.Text = iReader["Zip"] == DBNull.Value ? "" : iReader["Zip"].ToString();
     }
 }
Ejemplo n.º 2
0
 public void FetchAndBind(Int32 _clientNumber)
 {
     Whitfieldcore _wc = new Whitfieldcore();
     IDataReader iReader = _wc.GetClientInfo(_clientNumber);
     // ' Loop through the DataReader and write out each entry
     while (iReader.Read())
     {
         txtclientname.Text = iReader["Name"] == DBNull.Value ? "" : iReader["Name"].ToString();
         String cType = iReader["ClientType"] == DBNull.Value ? "" : iReader["ClientType"].ToString();
         ddlClientType.SelectedIndex = ddlClientType.Items.IndexOf(ddlClientType.Items.FindByValue(cType.ToString()));
         txtstreet.Text = iReader["Street"] == DBNull.Value ? "" : iReader["Street"].ToString();
         String City = iReader["City"] == DBNull.Value ? "" : iReader["City"].ToString();
         ddlCity.SelectedIndex = ddlCity.Items.IndexOf(ddlCity.Items.FindByValue(City.ToString()));
         String Statecd = iReader["State"] == DBNull.Value ? "" : iReader["State"].ToString();
         ddlState.SelectedIndex = ddlState.Items.IndexOf(ddlState.Items.FindByValue(Statecd.ToString()));
         txtPhNumber.Text = iReader["Phone"] == DBNull.Value ? "" : iReader["Phone"].ToString();
         txtFaxNumber.Text = iReader["Fax"] == DBNull.Value ? "" : iReader["Fax"].ToString();
         txtFTP.Text = iReader["Web"] == DBNull.Value ? "" : iReader["Web"].ToString();
         txtLogin.Text = iReader["login"] == DBNull.Value ? "" : iReader["login"].ToString();
         txtPass.Text = iReader["pw"] == DBNull.Value ? "" : iReader["pw"].ToString();
         txtWeb.Text = iReader["Web"] == DBNull.Value ? "" : iReader["Web"].ToString();
         txtNotes.Text = iReader["Notes"] == DBNull.Value ? "" : iReader["Notes"].ToString();
     }
 }