03-08-20, 03:17 AM
وعليكم السلام ورحمة الله وبركاته
أهلا بك أخي الكريم , وكل عام وأنت بخير , الشكر الجزيل للأخ "حريف برمجة" على تقديم المساعده الله يجعلها في ميزان حسناته , هذا تعديل آخر لكود الحفظ :
- جربه ورد خبر إن ضبط معاك , بالتوفيق .
أهلا بك أخي الكريم , وكل عام وأنت بخير , الشكر الجزيل للأخ "حريف برمجة" على تقديم المساعده الله يجعلها في ميزان حسناته , هذا تعديل آخر لكود الحفظ :
PHP كود :
If RS.State = 1 Then RS.Close
RS.open "select * from Table_Add_books where ID_Cod='" & Trim(TextID.Text) & "'", cn, adOpenKeyset, adLockOptimistic
If RS.RecordCount <= 0 Then
If RS.State = 1 Then RS.Close
MsgBox "لم يتم العثور على بيانات هذا الكتاب", vbExclamation, "إجــراء الإعارة ..."
Exit Sub
End If
If RS!ID_alnuskh <= 0 Then
If RS.State = 1 Then RS.Close
MsgBox "لايوجد نسخ متاحة للإستعارة لهذا الكتاب تم إستعارة جميع النسخ", vbExclamation, "إجــراء الإعارة ..."
Exit Sub
End If
If Val(Trim(TextCount.Text)) <= 0 Then
If RS.State = 1 Then RS.Close
MsgBox "أكتب عدد النسخ المراد إستعارتها لهذا الكتاب", vbExclamation, "إجــراء الإعارة ..."
Exit Sub
End If
If Val(Trim(TextCount.Text)) > RS!ID_alnuskh Then
If RS.State = 1 Then RS.Close
MsgBox "عدد النسخ المراد إستعارتها أكبر من عدد النسخ المتبقية لهذا الكتاب", vbExclamation, "إجــراء الإعارة ..."
Exit Sub
End If
TextIDalnuskh.Text = RS!ID_alnuskh
If RS.State = 1 Then RS.Close
RS.open "select * from Table_aliieara where ID='" & Trim(TextAID.Text) & "'", cn, adOpenKeyset, adLockOptimistic
If RS.RecordCount <> 1 Then
RS.AddNew
RS!ID = Trim(TextAID.Text)
RS!Cod_altasnif = Trim(TextCod.Text)
RS!tasnif_BooK = Trim(Combotasnif.Text)
RS!altasnif_type = Trim(Listtype.Text)
RS!Book_name = Trim(TextBook.Text)
RS!almualaf_name = Trim(TextalMoalf.Text)
RS!almustaeir_name = Trim(Textalmustaeir.Text)
RS!almustaeir_sifat = Trim(Textsifat.Text)
RS!College_Name = Trim(TextCollege.Text)
RS!alqism_name = Trim(Textalqism.Text)
RS!Study_number = Trim(TextSnumber.Text)
RS!aliieara_Date = Trim(TextSDate.Text)
RS!number_days = Trim(TextNDays.Text)
RS!Return_date = Trim(TextEDate.Text)
RS!ID_Count = Trim(TextCount.Text)
RS!ID_CCount = Trim(TextCCount.Text)
RS!DAT = Trim(TextDAT.Text)
RS!Time = Trim(TextTime.Text)
RS.Update
If RS.State = 1 Then RS.Close
'FillSubtract
cn.Execute "update Table_Add_books set ID_alnuskh=ID_alnuskh-" & Val(TextCount) & " Where ID_Cod='" & Trim(TextID.Text) & "'"
DoEvents
TextIDalnuskh1 = Val(TextIDalnuskh) - Val(TextCount)
MsgBox "تم إعـارة كتاب : " & " " & TextBook.Text & " - عدد النسخ الباقية : " & TextIDalnuskh1.Text & " - كتاباً - " & " - لـ : " & Textalmustaeir.Text & " - الصفة : " & Textsifat.Text & " - الكلية : " & TextCollege.Text & " - الرقم الدراسي : " & TextSnumber.Text & " - بنجاح " & "", vbInformation + vbMsgBoxRight, "إجــراء الإعارة ..."
End If
' ============================
Call Form_Load
Call Clear_Text
- جربه ورد خبر إن ضبط معاك , بالتوفيق .
كود :
For Each Breathe in MyLife
Breathe.Say " سبحان الله والحمد لله ولا إله إلا الله والله أكبر أستغر الله العظيم وأتوب إليه"
Next
