Перегрузка функций
Date: 07/03/07
(Code WTF) Keywords: sql
int AddFLReportRec(long lIDRecord, long bank, short oper_i, long isSlType, long isTerr, short idPdi,
char * fio, char * series, char * number, char * inn, long id_client, long id_contact,
short kop, short mop, short oper, long lNopod, long lType, short sSign)
{
l
R_SL_PL e_pl;
...
e_pl.A_SYSID = lIDRecord;
e_pl.A_DATE_OP = date;
e_pl.A_TIME_OP = time;
e_pl.A_BANK = bank;
e_pl.A_OPER_I = oper_i;
e_pl.A_SLTYPE = isSlType;
e_pl.A_ISTER = isTerr;
e_pl.A_SYSID_PDI = idPdi;
e_pl.A_ID_CLIENT = id_client;
e_pl.A_SYSID_CONTACTER = id_contact;
e_pl.A_KOP = kop;
e_pl.A_MOP = mop;
e_pl.A_OPER = oper;
e_pl.A_NOPOD = lNopod;
e_pl.A_TYPE = lType;
e_pl.A_SIGN = sSign;
strncpy(e_pl.A_FIO,fio,sizeof(e_pl.A_FIO)-1);
strncpy(e_pl.A_SERIES,series,sizeof(e_pl.A_SERIES)-1);
strncpy(e_pl.A_NUMBER,number,sizeof(e_pl.A_NUMBER)-1);
strncpy(e_pl.A_INN,inn,sizeof(e_pl.A_INN)-1);
EXEC SQL INSERT INTO R_SL_PL VALUES(:e_pl);
return 1;
sql_error: sql_error_func("AddFLReportRec");
}
int AddFLReportRec(R_SL_PL * e_pl)
{
int result=0;
if(!e_pl) return 0;
result = AddFLReportRec(e_pl->A_SYSID, e_pl->A_BANK, e_pl->A_OPER_I, e_pl->A_SLTYPE, e_pl->A_ISTER,
e_pl->A_SYSID_PDI, e_pl->A_FIO, e_pl->A_SERIES, e_pl->A_NUMBER, e_pl->A_INN,
e_pl->A_ID_CLIENT, e_pl->A_SYSID_CONTACTER, e_pl->A_KOP, e_pl->A_MOP,
e_pl->A_OPER, e_pl->A_NOPOD, e_pl->A_TYPE, e_pl->A_SIGN);
return result;
sql_error: sql_error_func("AddFLReportRec");
}
Source: http://community.livejournal.com/code_wtf/92713.html