<-#Включите файл = ../__ Inc/Goperation.asp->
<%
Dim Intbilltotal, Intbilltype, Intbillvalue, Dtatoday, I, StrbillCode
REM Количество отдельных записей (количество подготовки)
intbilltotal = request.form (bn)
intbilltotal = tonum (intbilltotal, 10)
intbilltype = getOpertype ()
intbillValue = getOpervalue ()
dtatoday = date ()
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
REM ## Элемент работы
Dim dtabilldate, Strbilluser, Strbillcheckuser, StrbillContent
Dim curbillcost, curbillcostasp, intcustid, strcustname, strpaytype, inttotalnum
Dim Dtabillyear, Intbillid, Intbillplanid, Strbillplannum
REM ## DTABILLDATE ЕДИНСТВЕННАЯ ДАТА, ПРИМЕР ФОРМА СТРИЛЛУСЕРА, ПИКТАРЬ СТРБИЛЛЕККАСЕР, INBILLID SINGE ID
Rem ## strbillcontent ОДНОВАЯ ПРИМЕЧАНИЯ, номер потока StrbillCode, общая цена CurbillCost (JS), Curbillcostasp Общая цена (ASP)
REM ## INTCUSTID Идентификатор клиента, имя клиента StrcustNam
Rem ## intbilltype один тип, intbillvalue Описание одного типа, идентификатор плана Intbillplanid, номер плана Strbillplannum
Rem ## одиночная дата работы
dtabilldate = reply (trim (request.form (billdate)),., -)
Если нет isdate (dtabilldate), то тогда
ouser.gs_addmessage Одиночная дата операции пуста
Еще
dtabilldate = cdate (dtabilldate)
dtabillyear = год (dtabilldate)
If (osys.checkyearout (dtabillyear)) тогда
OUSER.GS_ADDMESSAGE Единственная дата работы (& dtabillyear &) из диапазона
Конец, если
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ######################
REM ## ограничения хранения данных
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ######################
Конец, если
Rem ## Form Filler
strbilluser = trim (request.form (billuser) и)
Если strbilluser = тогда
ouser.gs_addmessage Форма пуста
Конец, если
Rem ## Пикап
strbillcheckuser = trim (request.form (billcheckuser) и)
Если strbillcheckuser = тогда
ouser.gs_addmessage держатель пикапа пуст
Конец, если
REM ## Ошибка поворота
ouser.gs_showmessage 1
Rem ## Другие проекты
curbillcost = tocur (request.form (totalprice) и, 0)
curbillcostasp = 0
Intcustid = tonum (request.form (custid) &, 0)
strcustname = request.form (custname)
strpaytype = request.form (paytype)
strbillcontent = request.form (billcontent)
intbillplanid = tonum (request.form (billplan) &, 0)
strbillplannum = getbillnuber (intbillplanid)
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
REM ## Получить данные пользователя ввода
Dim arrrecordinfo ()
Dim Inttempid, curtempprice, curtemptotal, curtempcost, curtempaspc
Dim Strtempcode, Strtempname, Strtempspec, Strtempunit, int -intempout, strtempcontent
Rem ## inttempid временный идентификатор продукта, цена за единицу единицы, Curteptotal Количество, общая цена Curtempcost (JS)
Rem ## Curtempaspc Общая цена продукта (ASP), код StrtempCode, имя StrtempNam
Rem ## strtempunit bind, strtempcontent notes
Redim arrrerecordinfo (10, 0)
REM ## Инициализируйте количество отдельных строк до 0 и отфильтровывает количество строк до 0
inttotalnum = 0
intPempout = 0
REM ## Инициализировать полезные данные, представленные клиентом
Для i = 1 к INTBILLTOTAL
inttempid = tonum (request.form (fpid & i), 0)
curtempprice = tocur (request.form (fpprice & i), 0)
curtemptotal = tocur (request.form (fptotal & i), 0)
curtempcost = tocur (request.form (fpcost & i), 0)
curtempaspc = curtempprice * curtemptotal
If ((curtempprice> 0) и (curtemptotal <> 0) и (inttempid> 0)) тогда
REM ## Доступные данные
inttotalnum = inttotalnum + 1
curbillcostasp = curbillcostasp + curtempaspc
strtempcode = trim (request.form (fpmodel & i)))
strtempname = trim (request.form (fpvalue & i)))
strtempspec = trim (request.form (fspec & i))
strtempunit = trim (request.form (fpunit & i))
strtempcontent = trim (request.form (fpcontent & i)))
Redim urrecordinfo (10, Inttotalnum)
arrrecordinfo (0, inttotalnum) = inttempid
arrrecordinfo (1, inttotalnum) = strtempname
arrrecordinfo (2, inttotalnum) = strtempcode
arrrecordinfo (3, inttotalnum) = strtempspec
arrrecordinfo (4, inttotalnum) = strtempunit
arrrecordinfo (5, inttotalnum) = curtempprice
arrrecordinfo (6, inttotalnum) = curtemptotal
arrrecordinfo (7, inttotalnum) = curtempcost
arrrecordinfo (8, inttotalnum) = curtempaspc
arrrecordinfo (9, inttotalnum) = strtempcontent
Elseif (inttempid> 0) тогда
int -intempout = int -intempout + 1
Конец, если
Следующий
Если inttotalnum <1, то тогда
OUSER.GS_ADDMESSAGE Нет данных о продукте в порядке операции
ouser.gs_addmessage Всего и данных и данных (цена за единицу продукта равен 0, пустое или отрицательное, количество равно 0 или пусто) отфильтрована
ouser.gs_showmessage 1
Конец, если
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
Rem ## Open Connection
f__openconn
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
Rem ## проверьте, существует ли таблица или нет
Dim tbltablename
tbltablename = ouser.getbilltable (dtabillyear)
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
REM ## Создание однопроектных операторов SQL и сохранить их
strbillcode = getopebill ()
sql = select * from [& gbl__str_tab_inf_bill &]
Установить rs = server.createObject (adodb.recordset)
Rs.open SQL, Conn, 1, 3
Rs.addnew
rs (customerid) = intcustid
rs (customername) = strcustname
rs (bitplanid) = intbillplanid
rs (bitplannum) = strbillplannum
rs (bittype) = intbilltype
rs (bitname) = intbillvalue
rs (bitcode) = strbillcode
rs (bitnum) = inttotalnum
rs (bitprice) = curbillcost
rs (bitpriceasp) = curbillcostasp
rs (bitdate) = dtabilldate
rs (bitpay) = strpaytype
rs (bitcontent) = strbillcontent
rs (filluser) = strbilluser
rs (sureuser) = strbillcheckuser
rs (userid) = ouser.uid
rs (имя пользователя) = ouser.username
Rs.Update
intbillid = rs (id)
strbillcode = getbillnuber (intbillid)
rs (bitcode) = strbillcode
Rs.Update
Rs.close
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
REM ## Конструирует строки данных SQL и сохранения
Для i = 1 к Inttotalnum
SQL = INSERT в [& TBLTABLENAME &] & _
(Bittype, Bitvalue, Bitid, Bitcode, ProductId, ProductName, ProductCode, ProductsPec & _
, ProductUnit, ProductPrice, ProductNum, PRICeCount, PRICEASPC, Billdate, Content) и _
Ценности( & _
& intbilltype & & _
, '& tosqlr (intbillvalue) &' & _
, & intbillid & & _
, '& tosqlr (strbillcode) &' & _
& arrrecordinfo (0, i) & _
, '& tosqlr (arrrecordinfo (1, i)) &' & _
, '& tosqlr (arrrecordinfo (2, i)) &' & _
, '& tosqlr (arrrecordinfo (3, i)) &' & _
, '& tosqlr (arrrecordinfo (4, i)) &' & _
, & arrrecordinfo (5, i) & _
, & arrrecordinfo (6, i) и _
, & arrrecordinfo (7, i) и _
, & arrrecordinfo (8, i) & _
, # & dtabilldate & # & _
, '& tosqlr (arrrecordinfo (9, i)) &' & _
)
conn.execute (sql)
Следующий
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
Rem ## закрыть соединение
f__closeconn
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
REM ## Информация о приглашении вывода
ouser.gs_addmessage Всего и данных и данных (цена за единицу продукта равен 0, пустое или отрицательное, количество равно 0 или пусто) отфильтрована
OUSER.GS_ADDMESSAGE В общей сложности & inttotalnum и элементах сохраняются и хранятся в базе данных, общая цена: & formatnumber (curbillcost, 2, true) и (& formatnumber (curbillcostasp, 2, true) &)
ouser.gs_addmessage Просмотреть этот список (& strbillcode &)
ouser.gs_addmessage print
ouser.gs_showmessage 0
Rem ################################################# ######################################################################################################## вместе ######################################################################## вместе ########################
%>