Esempio n. 1
0
void  zarsocot_v_e_knopka(GtkWidget *widget,class l_zarsocot_v_data *data)
{
iceb_u_str kod(0);
iceb_u_str naim(0);

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));

switch (knop)
 {

  case E_KOD:
    if(l_zarsocf(1,&kod,&naim,data->window) == 0)
     data->kod.new_plus(kod.ravno());

    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD]),data->kod.ravno_toutf());

    return;
  case E_SHET:
    iceb_vibrek(1,"Plansh",&data->shet,&naim,data->window);
    
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_SHET]),data->shet.ravno_toutf());
    return;

 }
}
Esempio n. 2
0
void  l_xrnnv_v_e_knopka(GtkWidget *widget,class l_xrnnv_v_data *data)
{
SQL_str row;
class SQLCURSOR cur;
iceb_u_str kod("");
iceb_u_str naim("");
char strsql[512];
int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {
  case E_DATAVNN:

    if(iceb_calendar(&data->datavnn,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAVNN]),data->datavnn.ravno());
      
    return;  



  case E_NAIM_KONTR:

    if(iceb_l_kontr(1,&kod,&naim,data->window) == 0)
     {
      data->naim_kontr.new_plus(iceb_get_pnk(kod.ravno(),1,data->window));
      /*читаем налоговый номер*/
      sprintf(strsql,"select innn from Kontragent where kodkon='%s'",kod.ravno());
      if(iceb_sql_readkey(strsql,&row,&cur,data->window) == 1)
        gtk_entry_set_text(GTK_ENTRY(data->entry[E_INN]),row[0]);
        
     }    
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_NAIM_KONTR]),data->naim_kontr.ravno_toutf());
    return;  

  case E_KOD_GR:
    if(l_xrnngpn(1,&kod,&naim,data->window) == 0)
     data->kod_gr.new_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_GR]),data->kod_gr.ravno_toutf());
    return;  

  case E_KOD_OP:
    xrnn_kord(1,&data->kod_op,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_OP]),data->kod_op.ravno_toutf());
    return;  

  case E_VIDDOK:
    rnnvvd(&data->viddok,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_VIDDOK]),data->viddok.ravno_toutf());
    return;  

  case E_DATV:

    if(iceb_calendar(&data->datv,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATV]),data->datv.ravno());
      
    return;  
     
 }
}
Esempio n. 3
0
void  otrvr_t_v_e_knopka(GtkWidget *widget,class l_otrvr_p_data *data)
{
    iceb_u_str kod(0);
    iceb_u_str naim(0);

    int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));

    switch (knop)
    {

    case E_TABNOM:
        if(l_sptbn(1,&kod,&naim,0,data->window) == 0)
            data->poi->tabnom.z_plus(kod.ravno());
        gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->poi->tabnom.ravno());
        return;

    case E_KOD_TAB:
        if(l_zarvidtab(1,&kod,&naim,data->window) == 0)
            data->poi->kod_tab.z_plus(kod.ravno());
        gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_TAB]),data->poi->kod_tab.ravno());
        return;

    case E_PODR:
        if(l_zarpodr(1,&kod,&naim,data->window) == 0)
            data->poi->podr.z_plus(kod.ravno());
        gtk_entry_set_text(GTK_ENTRY(data->entry[E_PODR]),data->poi->podr.ravno());
        return;
    }
}
Esempio n. 4
0
void  zar_sprav_m_e_knopka(GtkWidget *widget,class zar_sprav_m_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {
   
  case E_DATAN:
    iceb_calendar1(&data->rk->datan,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAN]),data->rk->datan.ravno_toutf());
    return;

  case E_DATAK:
    iceb_calendar1(&data->rk->datak,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAK]),data->rk->datak.ravno_toutf());
    return;

  case E_TABNOM:
    if(l_sptbn(1,&kod,&naim,0,data->window) == 0)
     {
      data->rk->tabnom.new_plus(kod.ravno());
      data->rk->fio.new_plus(naim.ravno());
     }
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->rk->tabnom.ravno_toutf());
    gtk_label_set_text(GTK_LABEL(data->label_fio),data->rk->fio.ravno_toutf());
    return;
  
 }
}
Esempio n. 5
0
void  l_uplsal_p_v_knopka(GtkWidget *widget,class l_uplsal_p_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("l_uplsal_p_v_knopka knop=%d\n",knop);

switch (knop)
 {

  case E_KOD_AVT:
     if(l_uplavt(1,&kod,&naim,data->window) == 0)
      data->rk->kod_avt.z_plus(kod.ravno());
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_AVT]),data->rk->kod_avt.ravno());
      
    return;  

  case E_KOD_VOD:
     if(l_uplout(1,&kod,&naim,1,data->window) == 0)
      data->rk->kod_vod.z_plus(kod.ravno());
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_VOD]),data->rk->kod_vod.ravno());
      
    return;  

  case E_KOD_TOP:
     if(l_uplmt(1,&kod,&naim,data->window) == 0)
      data->rk->kod_top.z_plus(kod.ravno());
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_TOP]),data->rk->kod_top.ravno_toutf());
      
    return;  

 }   
}
Esempio n. 6
0
File: glowny.c Progetto: kmieszala/C
int main() {
	int lata;
	printf("Podaj Twój wiek w latach. \n");
	scanf("%d", &lata);
	printf("Żyjesz %d sekund. \n", kod(lata));
	return 0;
}
Esempio n. 7
0
void  l_zar_dok_p_v_e_knopka(GtkWidget *widget,class l_zar_dok_p_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {
  case E_DATAN:

    if(iceb_calendar(&data->rk->datan,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAN]),data->rk->datan.ravno());
      
    return;  

  case E_DATAK:

    if(iceb_calendar(&data->rk->datak,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAK]),data->rk->datak.ravno());
      
    return;  

  case E_PODR:

    if(l_zarpodr(1,&kod,&naim,data->window) == 0)
     data->rk->podr.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_PODR]),data->rk->podr.ravno());
      
    return;  

   
 }
}
Esempio n. 8
0
void  upl_pavt_v_e_knopka(GtkWidget *widget,class upl_pavt_m_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
/*g_print("upl_pavt_v_e_knopka knop=%d\n",knop);*/

switch (knop)
 {
  case E_DATAN:

    if(iceb_calendar(&data->rk->datan,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAN]),data->rk->datan.ravno());
      
    return;  

  case E_DATAK:

    if(iceb_calendar(&data->rk->datak,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAK]),data->rk->datak.ravno());
      
    return;  

  case E_KOD_VOD:

    if(l_uplout(1,&kod,&naim,1,data->window) == 0)
     data->rk->kod_vod.z_plus(kod.ravno());

    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_VOD]),data->rk->kod_vod.ravno());
      
    return;  

  case E_KOD_AVT:

    if(l_uplavt(1,&kod,&naim,data->window) == 0)
     data->rk->kod_avt.z_plus(kod.ravno());

    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_AVT]),data->rk->kod_avt.ravno());
      
    return;  

  case E_KOD_POD:

    if(l_uplpod(1,&kod,&naim,data->window) == 0)
     data->rk->kod_pod.z_plus(kod.ravno());

    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_POD]),data->rk->kod_pod.ravno());
      
    return;  


 }
}
Esempio n. 9
0
void  arz_m_e_knopka(GtkWidget *widget,class arz_m_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {
  case E_DATA:
    iceb_calendar1(&data->rk->data,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATA]),data->rk->data.ravno_toutf());
    return;
  case E_DATA_PER:

    if(iceb_calendar(&data->rk->data_per,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATA_PER]),data->rk->data_per.ravno());
      
    return;  

   
  case E_TABNOM:
    if(l_sptbn(1,&kod,&naim,0,data->window) == 0)
     data->rk->tabnom.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->rk->tabnom.ravno_toutf());
    return;
  
  case E_KOD_NAH:
    if(l_zarnah(1,&kod,&naim,data->window) == 0)
     data->rk->kod_nah.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_NAH]),data->rk->kod_nah.ravno_toutf());
    return;
  
  case E_PODR:
    if(l_zarpodr(1,&kod,&naim,data->window) == 0)
     data->rk->podr.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_PODR]),data->rk->podr.ravno_toutf());
    return;
  
  case E_KOD_GRUP_POD:
    if(l_gruppod(1,&kod,&naim,data->window) == 0)
     data->rk->kod_grup_pod.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_GRUP_POD]),data->rk->kod_grup_pod.ravno_toutf());
    return;

  case E_KOD_KAT:
    if(l_zarkateg(1,&kod,&naim,data->window) == 0)
     data->rk->kod_kat.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_KAT]),data->rk->kod_kat.ravno_toutf());
    return;
    
 }
}
Esempio n. 10
0
void  ukrrpw_v_e_knopka(GtkWidget *widget,class ukrrpw_m_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
/*g_print("ukrrpw_v_e_knopka knop=%d\n",knop);*/

switch (knop)
 {
  case E_DATAN:

    if(iceb_calendar(&data->rk->datan,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAN]),data->rk->datan.ravno());
      
    return;  

  case E_DATAK:

    if(iceb_calendar(&data->rk->datak,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAK]),data->rk->datak.ravno());
      
    return;  


  case E_SHETU:

    if(iceb_l_plansh(1,&kod,&naim,data->window) == 0)
      data->rk->shetu.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_SHETU]),data->rk->shetu.ravno_toutf());
      
    return;  

  case E_VIDKOM:

    if(l_ukrvk(1,&kod,&naim,data->window) == 0)
     data->rk->vidkom.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_VIDKOM]),data->rk->vidkom.ravno_toutf());
      
    return;  


  case E_KONTR:

    if(iceb_l_kontr(1,&kod,&naim,data->window) == 0)
     data->rk->kontr.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KONTR]),data->rk->kontr.ravno_toutf());
      
    return;  

   

 }
}
Esempio n. 11
0
void  zar_otrsh_m_e_knopka(GtkWidget *widget,class zar_otrsh_m_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {
  case E_DATAN:
    iceb_calendar1(&data->rk->datan,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAN]),data->rk->datan.ravno_toutf());
    return;

  case E_DATAK:
    iceb_calendar1(&data->rk->datak,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAK]),data->rk->datak.ravno_toutf());
    return;

   
  case E_TABNOM:
    if(l_sptbn(1,&kod,&naim,0,data->window) == 0)
     data->rk->tabnom.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->rk->tabnom.ravno_toutf());
    return;
  
  case E_PODR:
    if(l_zarpodr(1,&kod,&naim,data->window) == 0)
     data->rk->podr.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_PODR]),data->rk->podr.ravno_toutf());
    return;
  

  case E_KOD_KAT:
    if(l_zarkateg(1,&kod,&naim,data->window) == 0)
     data->rk->kod_kat.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_KAT]),data->rk->kod_kat.ravno_toutf());
    return;

  case E_KOD_TAB:

    if(l_zarvidtab(1,&kod,&naim,data->window) == 0)
     data->rk->kod_tab.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_TAB]),data->rk->kod_tab.ravno_toutf());

    return;  
    
 }
}
Esempio n. 12
0
void  zar_spisr_m_e_knopka(GtkWidget *widget,class zar_spisr_m_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {
   
  
  case E_PODR:
    if(l_zarpodr(1,&kod,&naim,data->window) == 0)
     data->rk->podr.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_PODR]),data->rk->podr.ravno_toutf());
    return;

  case E_KOD_KATEG:
    if(l_zarkateg(1,&kod,&naim,data->window) == 0)
     data->rk->kod_kateg.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_KATEG]),data->rk->kod_kateg.ravno_toutf());
    return;

  case E_KOD_ZVAN:
    if(l_zarzvan(1,&kod,&naim,data->window) == 0)
     data->rk->kod_zvan.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_ZVAN]),data->rk->kod_zvan.ravno_toutf());
    return;

  case E_SHETU:
    if(iceb_l_plansh(1,&kod,&naim,data->window) == 0)
     data->rk->shetu.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_SHETU]),data->rk->shetu.ravno_toutf());
    return;

  case E_TABNOM:
    if(l_sptbn(1,&kod,&naim,0,data->window) == 0)
     data->rk->tabnom.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->rk->tabnom.ravno_toutf());
    return;
  

 }
}
Esempio n. 13
0
void  iceb_l_plansh_p_e_knopka(GtkWidget *widget,class iceb_l_plansh_p *data)
{
    iceb_u_str kod("");
    iceb_u_str naim("");

    int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

    switch (knop)
    {

    case E_KOD_SUBBAL:
        if(iceb_l_subbal(1,&kod,&naim,data->window) == 0)
            data->rk->kod_subbal.z_plus(kod.ravno());
        gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_SUBBAL]),data->rk->kod_subbal.ravno_toutf());
        return;

    }
}
Esempio n. 14
0
void  zar_ar_v_e_knopka(GtkWidget *widget,class zar_ar_v_data *data)
{
    iceb_u_str kod(0);
    iceb_u_str naim(0);

    int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));

    switch (knop)
    {
    case E_DATAR:
        iceb_calendar1(&data->rk->datar,data->window);
        gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAR]),data->rk->datar.ravno_toutf());
        return;

    case E_TABNOM:
        if(l_sptbn(1,&kod,&naim,0,data->window) == 0)
            data->rk->tabnom.z_plus(kod.ravno());

        gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->rk->tabnom.ravno_toutf());
        return;

    case E_NAH_ONLY:
        if(l_zarnah(1,&kod,&naim,data->window) == 0)
            data->rk->nah_only.z_plus(kod.ravno());

        gtk_entry_set_text(GTK_ENTRY(data->entry[E_NAH_ONLY]),data->rk->nah_only.ravno_toutf());
        return;

    case E_UDER_ONLY:
        if(l_zarud(1,&kod,&naim,data->window) == 0)
            data->rk->uder_only.z_plus(kod.ravno());

        gtk_entry_set_text(GTK_ENTRY(data->entry[E_UDER_ONLY]),data->rk->uder_only.ravno_toutf());
        return;

    case E_PODR:
        if(l_zarpodr(1,&kod,&naim,data->window) == 0)
            data->rk->podr.z_plus(kod.ravno());

        gtk_entry_set_text(GTK_ENTRY(data->entry[E_PODR]),data->rk->podr.ravno_toutf());
        return;
    }
}
Esempio n. 15
0
void  zar_srninu_m_e_knopka(GtkWidget *widget,class zar_srninu_m_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {
   
  case E_DATAN:
    iceb_calendar1(&data->rk->datan,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAN]),data->rk->datan.ravno_toutf());
    return;

  case E_DATAK:
    iceb_calendar1(&data->rk->datak,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATAK]),data->rk->datak.ravno_toutf());
    return;

  
  case E_KOD_NAH:
    if(l_zarnah(1,&kod,&naim,data->window) == 0)
     data->rk->kod_nah.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_NAH]),data->rk->kod_nah.ravno_toutf());
    return;

  case E_KOD_UD:
    if(l_zarud(1,&kod,&naim,data->window) == 0)
     data->rk->kod_ud.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_UD]),data->rk->kod_ud.ravno_toutf());
    return;
  
  case E_PODR:
    if(l_zarpodr(1,&kod,&naim,data->window) == 0)
     data->rk->podr.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_PODR]),data->rk->podr.ravno_toutf());
    return;
  

 }
}
Esempio n. 16
0
void  l_upldok_vzr_e_knopka(GtkWidget *widget,class l_upldok_vzr_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {

  case E_KOD_TOP:
    if(l_uplmt(1,&kod,&naim,data->window) == 0)
      data->kod_top.new_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_TOP]),data->kod_top.ravno_toutf());
      
    return;  

 }
}
Esempio n. 17
0
void  vvod_tabnom_e_knopka(GtkWidget *widget,class vvod_tabnom_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");
int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));

switch (knop)
 {
  case E_TABNOM:

//    gtk_signal_emit_by_name(GTK_OBJECT(data->entry[E_NOMST]),"activate");

    if(l_sptbn(1,&kod,&naim,0,data->window) == 0)
     {
      data->tabnom.new_plus(kod.ravno());
      gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->tabnom.ravno_toutf());
     }
    return;  

 }
}
Esempio n. 18
0
void  l_zar_dok_zap_p_e_knopka(GtkWidget *widget,class l_zar_dok_zap_p_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {

  case E_TABNOM:
    if(l_sptbn(1,&kod,&naim,0,data->window) == 0)
     data->rk->tabnom.z_plus(kod.ravno());

    gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->rk->tabnom.ravno_toutf());
    return;  
   
  case E_SHET:

    iceb_vibrek(0,"Plansh",&data->rk->shet,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_SHET]),data->rk->shet.ravno_toutf());

    return;  

  case E_KOD_NAH:
    if(data->prn == 1)
     if(l_zarnah(1,&kod,&naim,data->window) == 0)
      data->rk->kod_nah.z_plus(kod.ravno());
    if(data->prn == 2)
     if(l_zarud(1,&kod,&naim,data->window) == 0)
      data->rk->kod_nah.z_plus(kod.ravno());


    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KOD_NAH]),data->rk->kod_nah.ravno_toutf());

    return;  

 }
}
Esempio n. 19
0
void  l_nahud_v_e_knopka(GtkWidget *widget,class l_nahud_p_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");

int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("l_nahud_v_e_knopka knop=%d\n",knop);

switch (knop)
 {

  case E_PODR:

    if(l_zarpodr(1,&kod,&naim,data->window) == 0)
     data->poi->podr.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_PODR]),data->poi->podr.ravno_toutf());

    return;  

  case E_TABNOM:

    if(l_sptbn(1,&kod,&naim,0,data->window) == 0)
     data->poi->tabnom.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_TABNOM]),data->poi->tabnom.ravno_toutf());

    return;  

  case E_KATEG:

    if(l_zarkateg(1,&kod,&naim,data->window) == 0)
     data->poi->kateg.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KATEG]),data->poi->kateg.ravno_toutf());

    return;  

  case E_SHET:

    iceb_vibrek(0,"Plansh",&data->poi->shet,data->window);
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_SHET]),data->poi->shet.ravno_toutf());

    return;  

  case E_GRUP_PODR:

    if(l_gruppod(1,&kod,&naim,data->window) == 0)
     data->poi->grup_podr.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_GRUP_PODR]),data->poi->grup_podr.ravno_toutf());

    return;  

  case E_KODBANKA:

    if(l_zarsb(1,&kod,&naim,data->window) == 0)
     data->poi->kodbanka.z_plus(kod.ravno());
    gtk_entry_set_text(GTK_ENTRY(data->entry[E_KODBANKA]),data->poi->kodbanka.ravno_toutf());

    return;  


 }
}
Esempio n. 20
0
void  ukrvhd_v_e_knopka(GtkWidget *widget,class ukrvhd_data *data)
{
iceb_u_str kod("");
iceb_u_str naim("");
short d,m,g;
int knop=GPOINTER_TO_INT(gtk_object_get_user_data(GTK_OBJECT(widget)));
//g_print("dvtmcf1_v_e_knopka knop=%d\n",knop);

switch (knop)
 {
  case E_DATADOK:

    if(iceb_calendar(&data->datadok,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATADOK]),data->datadok.ravno());
      
    return;  

  case E_DATA_PRIK:

    if(iceb_calendar(&data->data_prik,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATA_PRIK]),data->data_prik.ravno());
      
    return;  

  case E_DATA_OTEZ:

    if(iceb_calendar(&data->data_otez,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATA_OTEZ]),data->data_otez.ravno());
      
    return;  

  case E_DATA_PRIEZ:

    if(iceb_calendar(&data->data_priez,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATA_PRIEZ]),data->data_priez.ravno());
      
    return;  

  case E_DATA_AO:

    if(iceb_calendar(&data->data_ao,data->window) == 0)
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_DATA_AO]),data->data_ao.ravno());
      
    return;  

  case E_NOMDOK:
     data->datadok.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(data->entry[E_DATADOK]))));
     if(data->datadok.getdlinna() <= 1)
      {
       iceb_menu_soob(gettext("Не введена дата документа!"),data->window);
       return;
      }

     if(iceb_u_rsdat(&d,&m,&g,data->datadok.ravno(),1) != 0)
      {
       iceb_menu_soob(gettext("Неправильно введена дата документа!"),data->window);
       return;
      }

     data->nomdok.new_plus(iceb_u_fromutf((char*)gtk_entry_get_text(GTK_ENTRY(data->entry[E_NOMDOK]))));

     if(data->nomdok.getdlinna() > 1)
      {
       iceb_menu_soob(gettext("Номер документа уже введён!"),data->window);
       return;
      }
     
     iceb_nomnak(g,"",&data->nomdok,0,3,0,data->window);
     
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_NOMDOK]),data->nomdok.ravno_toutf());
      
    return;  

  case E_VIDKOM:
     if(l_ukrvk(1,&kod,&naim,data->window) == 0)
      data->vidkom.new_plus(kod.ravno());
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_VIDKOM]),data->vidkom.ravno_toutf());
     gtk_label_set_text(GTK_LABEL(data->label_naim[1]),naim.ravno_toutf(20));
      
    return;  

  case E_KONTR:
     if(iceb_l_kontr(1,&kod,&naim,data->window) == 0)
      data->kontr.new_plus(kod.ravno());
 
     gtk_entry_set_text(GTK_ENTRY(data->entry[E_KONTR]),data->kontr.ravno_toutf());
     
     gtk_label_set_text(GTK_LABEL(data->label_naim[0]),naim.ravno_toutf(20));
      
    return;  

 }
}