<-#تضمين ملف = ../__ Inc/goperation.asp->
<٪
خافت intbilltotal ، intbilltype ، intbillvalue ، dtatoday ، i ، strbillcode
عدد السجلات المفردة (كمية التحضير)
intbilltotal = request.form (bn)
intbilltotal = tonum (intbilltotal ، 10)
intbilltype = getOperType ()
intbillvalue = getOpervalue ()
dtatoday = date ()
REM #################################################################################### ############################################################################ ################################################## ##########################
REM ## تشغيل عنصر التشغيل
Dim dtabilldate ، strbilluser ، strbillcheckuser ، strbillContent
خافت كوربيلكوست ، curbillcostasp ، intcustid ، strcustname ، strpaytype ، inttotalnum
dim dtabillyear ، intbillid ، intbillplanid ، strbillplannum
REM ## DtabillDate تاريخ واحد ، حشو نموذج strbilluser ، pickup strbillcheckuser ، معرف واحد intbillid
REM ## STRBILLCONTENT ملاحظة واحدة ، رقم تدفق STRBILLCODE ، السعر الإجمالي CURBILLCOST (JS) ، السعر الإجمالي CURBILLCOSTASP (ASP)
rem ## intcustid معرف العميل ، اسم العميل strcustname ، طريقة الدفع strpaytype ، inttotalnum عدد الخطوط الفردية
REM ## intbilltype نوع واحد ، intbillvalue نوع واحد الوصف ، معرف خطة intbillplanid ، رقم خطة strbillPlannum
REM ## تاريخ تشغيل واحد
dtabillDate = استبدال (trim (request.form (billdate)) ،. ، -)
إذا لم يكن iSdate (dtabilldate) ثم
OUSER.GS_ADDMessage التاريخ الوحيد للعملية فارغ
آخر
dtabilldate = cdate (dtabilldate)
dtabillyear = سنة (dtabilldate)
إذا (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
ريم ## مشاريع أخرى
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 arrecordinfo ()
خافت inttempid ، curtempprice ، curtemptotal ، curtempcost ، curtempaspc
Dim strtempcode ، strtempname ، strtemppec ، strtempunit ، inttempout ، strtempcontent
rem ## inttempided id id id inter ، curtempprice price
REM ## CURTEMPASPC السعر الإجمالي للمنتج (ASP) ، رمز STRTEMPCODE ، اسم StrTempName ، STRTEMPSPEC مواصفات
وحدة rem ## strtempunit ، ملاحظات strtempcontent
redim arrecordinfo (10 ، 0)
rem ## قم بتهيئة عدد الصفوف الفردية إلى 0 ، وتصفية عدد الصفوف إلى 0
inttotalnum = 0
inttempout = 0
rem ## تهيئة البيانات المفيدة المقدمة من العميل
لأني = 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 الحفاظ على arrrecordinfo (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) ثم
inttempout = inttempout + 1
إنهاء إذا
التالي
إذا كان inttotalnum <1 ثم
OUSER.GS_ADDMessage لا توجد بيانات منتج في ترتيب التشغيل
ouser.gs_addmessage إجمالي و inttempout والبيانات (سعر وحدة المنتج هو 0 ، فارغ أو سلبي ، يتم تصفية الكمية 0 أو فارغة)
ouser.gs_showmessage 1
إنهاء إذا
REM #################################################################################### ############################################################################ ################################################## ##########################
REM ## فتح الاتصال
f__openconn
REM #################################################################################### ############################################################################ ################################################## ##########################
ريم ## تحقق مما إذا كان الجدول موجودًا أم لا
قاتمة tbltablename
tbltablename = ouser.getBillTable (dtabillyear)
REM #################################################################################### ############################################################################ ################################################## ##########################
REM #################################################################################### ############################################################################ ################################################## ##########################
REM ## بناء عبارات SQL أحادية المشروع وحفظها
strbillcode = getOpeBill ()
SQL = SELECT * من [& gbl__str_tab_inf_bill &]
تعيين rs = server.createBject (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 SQL ROW
لأني = 1 إلى inttotalnum
sql = insert في [& tbltablename &] & _
(bittype ، bitvalue ، bitid ، bitcode ، productid ، productName ، ProductCode ، ProductPec & _
و 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 #################################################################################### ############################################################################ ################################################## ##########################
ريم ## معلومات موجه الإخراج
ouser.gs_addmessage إجمالي و inttempout والبيانات (سعر وحدة المنتج هو 0 ، فارغ أو سلبي ، يتم تصفية الكمية 0 أو فارغة)
OUSER.GS_ADDMessage يتم حفظ ما مجموعه و inttotalnum والعناصر وتخزينه في قاعدة البيانات ، السعر الإجمالي:
OUSER.GS_ADDMessage عرض هذه القائمة (& strbillcode &) معلومات
ouser.gs_addmessage طباعة هذا الطلب
ouser.gs_showmessage 0
REM #################################################################################### ############################################################################ ################################################## ##########################
٪>