Партнерка на США и Канаду по недвижимости, выплаты в крипто

  • 30% recurring commission
  • Выплаты в USDT
  • Вывод каждую неделю
  • Комиссия до 5 лет за каждого referral

  m_House = _house;

  m_Build = _build;

  m_Appartment = _appartment;

  }

  public static string GetAddrString(string _region, string _district, string _city, string _place, string _street, string _house, string _build, string _appartment)

  {

  DataSet _addrDataSet = new DataSet();

  string _result = "";

  string _shortPref="";

  string _regionStr="";

  string _districtStr = "";

  string _cityStr = "";

  string _placeStr = "";

  string _streetStr = "";

  string _regionSQL = string. Format("select name_region, short_pref from kladr_region where id_region='{0}'", _region);

  OleDbDataAdapter _regionAdapter = new OleDbDataAdapter(_regionSQL, Program. accessConnection);

  _regionAdapter. Fill(_addrDataSet, "t_region");

  _regionStr = _addrDataSet. Tables["t_region"].Rows[0]["name_region"] as string;

  _shortPref = _addrDataSet. Tables["t_region"].Rows[0]["short_pref"] as string;

  _regionStr = (_shortPref == "Респ" || _shortPref == "г") ? _shortPref+". " + _regionStr : _regionStr + " " + _shortPref + ".";

  if (_district!= "000")

  {

  string _districtSQL = string. Format("select name_district, short_pref from kladr_district where id_region='{0}' and id_district='{1}'", _region, _district);

  OleDbDataAdapter _districtAdapter = new OleDbDataAdapter(_districtSQL, Program. accessConnection);

  _districtAdapter. Fill(_addrDataSet, "t_district");

НЕ нашли? Не то? Что вы ищете?

  if (_addrDataSet. Tables["t_district"].Rows. Count!= 0)

  {

  _districtStr = _addrDataSet. Tables["t_district"].Rows[0]["name_district"] as string;

  _shortPref = _addrDataSet. Tables["t_district"].Rows[0]["short_pref"] as string;

  _districtStr = _districtStr + " " + _shortPref + ".";

  }

  }

  if (_city!= "000")

  {

  string _citySQL = string. Format("select name_city, short_pref from kladr_city where id_region='{0}' and id_district='{1}' and id_city='{2}'", _region, _district, _city);

  OleDbDataAdapter _cityAdapter = new OleDbDataAdapter(_citySQL, Program. accessConnection);

  _cityAdapter. Fill(_addrDataSet, "t_city");

  if (_addrDataSet. Tables["t_city"].Rows. Count!= 0)

  {

  _cityStr = _addrDataSet. Tables["t_city"].Rows[0]["name_city"] as string;

  _shortPref = _addrDataSet. Tables["t_city"].Rows[0]["short_pref"] as string;

  _cityStr = _shortPref + ". " + _cityStr;

  }

  }

  if (_place!= "000")

  {

  string _placeSQL = string. Format("select name_place, short_pref from kladr_place where id_region='{0}' and id_district='{1}' and id_city='{2}' and id_place='{3}'", _region, _district, _city, _place);

  OleDbDataAdapter _placeAdapter = new OleDbDataAdapter(_placeSQL, Program. accessConnection);

  _placeAdapter. Fill(_addrDataSet, "t_place");

  if (_addrDataSet. Tables["t_place"].Rows. Count!= 0)

  {

  _placeStr = _addrDataSet. Tables["t_place"].Rows[0]["name_place"] as string;

  _shortPref = _addrDataSet. Tables["t_place"].Rows[0]["short_pref"] as string;

  _placeStr = _shortPref + ". " + _placeStr;

  }

  }

  if (_street!= "0000")

  {

  string _streetSQL = string. Format("select name_street, short_pref from kladr_street where id_region='{0}' and id_district='{1}' and id_city='{2}' and id_place='{3}' and id_street='{4}'", _region, _district, _city, _place, _street);

  OleDbDataAdapter _streetAdapter = new OleDbDataAdapter(_streetSQL, Program. accessConnection);

  _streetAdapter. Fill(_addrDataSet, "t_street");

  if (_addrDataSet. Tables["t_street"].Rows. Count!= 0)

  {

  _streetStr = _addrDataSet. Tables["t_street"].Rows[0]["name_street"] as string;

  _shortPref = _addrDataSet. Tables["t_street"].Rows[0]["short_pref"] as string;

  _streetStr = _shortPref + ". " + _streetStr;

  }

  }

  _result = _regionStr + ((_districtStr!= "") ? ", " : "") + _districtStr + ((_cityStr!= "") ? ", " : "") + _cityStr + ((_placeStr!= "") ? ", " : "") + _placeStr + ", " + _streetStr;

  if (_house!= "") _result = _result + ", дом " + _house;

  if (_build!= "") _result = _result + ", корп." + _build;

  if (_appartment!= "") _result = _result + ", кв." + _appartment;

  _addrDataSet. Dispose();

  return _result;

  }

  public string GetAddrString()

  {

  return Address. GetAddrString(m_Region, m_District, m_City, m_Place, m_Street, m_House, m_Build, m_Appartment);

  }

  public string GetRegionStr()

  {

  string _shortPref = "";

  string _regionStr = "";

  DataSet _addrDataSet = new DataSet();

  string _regionSQL = string. Format("select name_region, short_pref from kladr_region where id_region='{0}'", m_Region);

  OleDbDataAdapter _regionAdapter = new OleDbDataAdapter(_regionSQL, Program. accessConnection);

  _regionAdapter. Fill(_addrDataSet, "t_region");

  _regionStr = _addrDataSet. Tables["t_region"].Rows[0]["name_region"] as string;

  _shortPref = _addrDataSet. Tables["t_region"].Rows[0]["short_pref"] as string;

  _regionStr = (_shortPref == "Респ" || _shortPref == "г") ? _shortPref + ". " + _regionStr : _regionStr + " " + _shortPref + ".";

  _addrDataSet. Dispose();

  return _regionStr;

  }

  public string GetShortAddrString()

  {

  DataSet _addrDataSet = new DataSet();

  string _result = "";

  string _shortPref = "";

  string _regionStr = "";

  string _districtStr = "";

  string _cityStr = "";

  string _placeStr = "";

  string _streetStr = "";

  if (m_City!= "000")

  {

  string _citySQL = string. Format("select name_city, short_pref from kladr_city where id_region='{0}' and id_district='{1}' and id_city='{2}'", m_Region, m_District, m_City);

  OleDbDataAdapter _cityAdapter = new OleDbDataAdapter(_citySQL, Program. accessConnection);

  _cityAdapter. Fill(_addrDataSet, "t_city");

  if (_addrDataSet. Tables["t_city"].Rows. Count!= 0)

  {

  _cityStr = _addrDataSet. Tables["t_city"].Rows[0]["name_city"] as string;

  _shortPref = _addrDataSet. Tables["t_city"].Rows[0]["short_pref"] as string;

  _cityStr = _shortPref + ". " + _cityStr;

  }

  }

  if (m_Place!= "000")

  {

  string _placeSQL = string. Format("select name_place, short_pref from kladr_place where id_region='{0}' and id_district='{1}' and id_city='{2}' and id_place='{3}'", m_Region, m_District, m_City, m_Place);

  OleDbDataAdapter _placeAdapter = new OleDbDataAdapter(_placeSQL, Program. accessConnection);

  _placeAdapter. Fill(_addrDataSet, "t_place");

  if (_addrDataSet. Tables["t_place"].Rows. Count!= 0)

  {

  _placeStr = _addrDataSet. Tables["t_place"].Rows[0]["name_place"] as string;

  _shortPref = _addrDataSet. Tables["t_place"].Rows[0]["short_pref"] as string;

  _placeStr = _shortPref + ". " + _placeStr;

  }

  }

  if (m_Street!= "0000")

  {

  string _streetSQL = string. Format("select name_street, short_pref from kladr_street where id_region='{0}' and id_district='{1}' and id_city='{2}' and id_place='{3}' and id_street='{4}'", m_Region, m_District, m_City, m_Place, m_Street);

  OleDbDataAdapter _streetAdapter = new OleDbDataAdapter(_streetSQL, Program. accessConnection);

  _streetAdapter. Fill(_addrDataSet, "t_street");

  if (_addrDataSet. Tables["t_street"].Rows. Count!= 0)

  {

  _streetStr = _addrDataSet. Tables["t_street"].Rows[0]["name_street"] as string;

  _shortPref = _addrDataSet. Tables["t_street"].Rows[0]["short_pref"] as string;

  _streetStr = _shortPref + ". " + _streetStr;

  }

  }

  _result = ((_cityStr!= "") ? ", " : "") + _cityStr + ((_placeStr!= "" && _cityStr!= "") ? ", " : "") + _placeStr + ", " + _streetStr;

  if (m_House!= "") _result = _result + ", дом " + m_House;

  if (m_Build!= "") _result = _result + ", корп." + m_Build;

  if (m_Appartment!= "") _result = _result + ", кв." + m_Appartment;

  _addrDataSet. Dispose();

  return _result;

  }

  }

}

Файл Client. cs

using System;

using System. Collections. Generic;

using System. Linq;

using System. Text;

using System. Data;

using System. Data. OleDb;

namespace Realty

{

  public class Client

  {

  public int m_ID;

  public string m_LastName="";

  public string m_FirstName="";

  public string m_SecondName="";

  public DateTime m_DateBirth = DateTime. Today;

  public string m_PlaceBirth = "";

  public int m_ResultDB=Constants. LOAD_OK;

  public Document m_Document;

  public Address m_Address;

  public Client(int _index=0)

  {

  m_ID = _index;

  if (m_ID > 0)

  {

  m_ResultDB = LoadFromDB();

  m_Document = new Document(m_ID, 0, 0, 0);

  }

  else

  {

  m_Address = new Address();

  m_Document = new Document();

  }

  }

  private int LoadFromDB()

  {

  try

  {

  DataSet _clientDataSet = new DataSet();

  string _queryClient = "SELECT t_clients.* FROM t_clients WHERE id_client = " + m_ID. ToString();

  OleDbDataAdapter _clientDataAdapter = new OleDbDataAdapter(_queryClient, Program. accessConnection);

  _clientDataAdapter. Fill(_clientDataSet, "t_client");

  if (_clientDataSet. Tables["t_client"].Rows. Count == 0) return Constants. LOAD_NO_DATA;

  DataRow _row = _clientDataSet. Tables["t_client"].Rows[0];

  m_LastName = _row["last_name"] as string;

Из за большого объема этот материал размещен на нескольких страницах:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19