示例#1
0
        //получение данных из БД
        private void get_data(ComboBox cmb1, ComboBox cmb2)
        {
            @base @base = new @base("select distinct agent.Id, man.fam, man.name, man.otch from man, agent, klient where man.dop_info = agent.Id and agent.Id <> klient.Id");

            znachenia = @base.vuvod();
            zapis_v_combobox(cmb1);
            @base.smena_zaprosa("select distinct klient.Id, man.fam, man.name, man.otch from man, klient, agent where man.dop_info = klient.Id and agent.Id <> klient.Id");
            znachenia = @base.vuvod();
            zapis_v_combobox(cmb2);
        }
示例#2
0
 //получение данных фио клиентов и риэлторов
 private string[] get_fio(string[] time_arr)
 {
     for (int i = 0; i < time_arr.Length; i++)
     {
         @base @base = new @base("");
         int   id_ag = Convert.ToInt32(time_arr[i].Substring(time_arr[i].IndexOf('Р')).Replace("Риэлтор:", "").Remove(time_arr[i].Substring(time_arr[i].IndexOf('Р')).Replace("Риэлтор:", "").IndexOf(" ")));
         int   id_kl = Convert.ToInt32(time_arr[i].Substring(time_arr[i].LastIndexOf(':') + 1).Replace("Клиент:", "").Remove(time_arr[i].Substring(time_arr[i].LastIndexOf(':') + 1).Replace("Клиент:", "").IndexOf(" ")));
         @base.smena_zaprosa("select distinct agent.Id, man.fam, man.name, man.otch from man, klient, agent where man.dop_info = " + id_ag + " and klient.Id <> " + id_ag + " and man.dop_info = agent.Id");
         string per = @base.vuvod();
         arr[i] = arr[i].Replace("Риэлтор:" + id_ag.ToString(), "Риэлтор:" + per.Replace("&", ""));
         @base.smena_zaprosa("select distinct klient.Id, man.fam, man.name, man.otch from man, klient, agent where man.dop_info = " + id_kl + " and agent.Id <> " + id_kl + " and man.dop_info = klient.Id");
         per         = @base.vuvod();
         time_arr[i] = time_arr[i].Replace("Клиент:" + id_kl.ToString(), "Клиент:" + per.Replace("&", ""));
     }
     return(time_arr);
 }
示例#3
0
        //получение данных
        private void get_data(ComboBox cmb1, ComboBox cmb2, ComboBox cmb3)
        {
            @base @base = new @base("select distinct agent.Id, man.fam, man.name, man.otch from man, agent, klient where man.dop_info = agent.Id and agent.Id <> klient.Id");

            znachenia = @base.vuvod();
            zapis_v_combobox(cmb1);
            @base.smena_zaprosa("select distinct klient.Id, man.fam, man.name, man.otch from man, klient, agent where man.dop_info = klient.Id and agent.Id <> klient.Id");
            znachenia = @base.vuvod();
            zapis_v_combobox(cmb2);
            @base.smena_zaprosa("select obj.Id, obj.city, obj.street, obj.nm_h, obj.nm_kw, kw.etag, kw.rooms, kw.s from obj, kw where obj.dop_inf = kw.Id");
            znachenia = @base.vuvod_obj("kw", false);
            @base.smena_zaprosa("select obj.Id, obj.city, obj.street, obj.nm_h, house.etag, house.rooms, house.s from obj, house where obj.dop_inf = house.Id");
            znachenia += @base.vuvod_obj("house", false);
            @base.smena_zaprosa("select obj.Id, obj.city, obj.street, land.s from obj, land where obj.dop_inf = land.Id");
            znachenia += @base.vuvod_obj("land", false);
            if (znachenia == "")
            {
                znachenia = "Отсутствую данные в БД";
            }
            zapis_v_combobox(cmb3);
        }