Súbor: [Platon] / tucniak / lib / lt_c.c (stiahnutie)
Revízia 1.1.1.1, Fri Nov 11 16:08:30 2005 UTC (19 years, 7 months ago) by koli
Zmeny od 1.1: +0 -0
[lines]
Initial import
|
// Copyright (c) 2003 Juraj Kolesár (koli) <koli@koli.sk>
#include "lt.h"
/******************************************************************************
int lt_c_phonescompany_data_init(T_COMPANY * company) {
register int i;
SET_CELL(company->pk, "", "pk_c_company", 0);
SET_CELL(company->name, "", "name", 20);
SET_CELL(company->idn, "", "idn", 10);
SET_CELL(company->txn, "", "txn", 10);
company->employees.table = NULL;
company->address.table = NULL;
company->phone.table = NULL;
company->email.table = NULL;
company->account.table = NULL;
company->notes.table = NULL;
for (i=0;i<__LT_C_COMPANY_PARAM_COUNT;i++) company->status[i] = false;
return(__LT_OK);
}
/******************************************************************************
int lt_c_phones_cols_init(T_COLS **cols) {
T_CELL cell[] = { //for additional datas stored in T_TABLE to showrow
{"", "", 0}, //PK
{"", "", 13}, //VALUE
{"", "", 20} //NOTE
};
*cols = g_slist_append(*cols, &(company->pk));
*cols = g_slist_append(*cols, &(company->name));
*cols = g_slist_append(*cols, &(company->idn));
*cols = g_slist_append(*cols, &(company->txn));
tdb_qs_set_columns(qs, *cols);
strcpy(qs->from, "c_company");
return(__LT_OK);
}
/******************************************************************************
int lt_c_company_employ(T_DB *tdb, T_COMPANY *company, T_PERSON *person) {
tdb_query(tdb, g_strdup_printf(
"INSERT INTO lists_c
(fk_table, fk_contact, c_table, c_contact, priority, note)
VALUES ('%s','%s','PERSON','COMPANY','P','zamestnanec')",
person->pk.value, company->pk.value)
);
return(__LT_OK);
}
/******************************************************************************/
Platon Group <platon@platon.sk> http://platon.sk/
|