تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
إمكانية إختصار هذا الكود بدالة
#1
السلام عليكم ورحمة الله وبركاته أعضاء المنتدي 
لدي هذا الكود وأريد إختصاره في دالة إن أمكن
PHP كود :
Private Sub Button1_Click(ByVal sender As System.ObjectByVal e As System.EventArgsHandles Button1.Click
Dim ZC
ZE As Integer
        Try
            ZC 
Integer.Parse(CboZCAT.Text)
 
           ZE Integer.Parse(CBoze.Text)

 
           If ZC And ZE 1 Then
                Txtone
.Text = (1500 35) / 100.ToString
            ElseIf ZC 
And ZE 2 Then
                Txtone
.Text = (1520 35) / 100.ToString
            ElseIf ZC 
And ZE 3 Then
                Txtone
.Text = (1540 35) / 100.ToString
            ElseIf ZC 
And ZE 1 Then
                Txtone
.Text = (1560 35) / 100.ToString
            ElseIf ZC 
And ZE 2 Then
                Txtone
.Text = (1580 35) / 100.ToString
            ElseIf ZC 
And ZE 3 Then
                Txtone
.Text = (1600 35) / 100.ToString
            ElseIf ZC 
And ZE 1 Then
                Txtone
.Text = (1620 35) / 100.ToString
            ElseIf ZC 
And ZE 2 Then
                Txtone
.Text = (1640 35) / 100.ToString
            ElseIf ZC 
And ZE 3 Then
                Txtone
.Text = (1660 35) / 100.ToString
            ElseIf ZC 
And ZE 1 Then
                Txtone
.Text = (1680 35) / 100.ToString
            ElseIf ZC 
And ZE 2 Then
                Txtone
.Text = (1700 35) / 100.ToString
            ElseIf ZC 
And ZE 3 Then
                Txtone
.Text = (1745 35) / 100.ToString
            ElseIf ZC 
And ZE 1 Then
                Txtone
.Text = (1790 35) / 100.ToString
            ElseIf ZC 
And ZE 2 Then
                Txtone
.Text = (1850 35) / 100.ToString
            ElseIf ZC 
And ZE 3 Then
                Txtone
.Text = (1910 35) / 100.ToString
            ElseIf ZC 
And ZE 1 Then
                Txtone
.Text = (1970 35) / 100.ToString
            ElseIf ZC 
And ZE 2 Then
                Txtone
.Text = (2040 35) / 100.ToString
            ElseIf ZC 
And ZE 3 Then
                Txtone
.Text = (2100 35) / 100.ToString
            ElseIf ZC 
And ZE 1 Then
                Txtone
.Text = (2170 35) / 100.ToString
            ElseIf ZC 
And ZE 2 Then
                Txtone
.Text = (2240 35) / 100.ToString
            ElseIf ZC 
And ZE 3 Then
                Txtone
.Text = (2300 35) / 100.ToString
            ElseIf ZC 
And ZE 1 Then
                Txtone
.Text = (2380 35) / 100.ToString
            ElseIf ZC 
And ZE 2 Then
                Txtone
.Text = (2460 35) / 100.ToString
            ElseIf ZC 
And ZE 3 Then
                Txtone
.Text = (2530 35) / 100.ToString
            ElseIf ZC 
And ZE 1 Then
                Txtone
.Text = (2610 35) / 100.ToString
            ElseIf ZC 
And ZE 2 Then
                Txtone
.Text = (2700 35) / 100.ToString
            ElseIf ZC 
And ZE 3 Then
                Txtone
.Text = (2780 35) / 100.ToString
            ElseIf ZC 
10 And ZE 1 Then
                Txtone
.Text = (2850 35) / 100.ToString
            ElseIf ZC 
10 And ZE 2 Then
                Txtone
.Text = (2920 35) / 100.ToString
            ElseIf ZC 
10 And ZE 3 Then
                Txtone
.Text = (2990 35) / 100.ToString
            ElseIf ZC 
10 And ZE 4 Then
                Txtone
.Text = (3060 35) / 100.ToString
            ElseIf ZC 
11 And ZE 1 Then
                Txtone
.Text = (3070 35) / 100.ToString
            ElseIf ZC 
11 And ZE 2 Then
                Txtone
.Text = (3130 35) / 100.ToString
            ElseIf ZC 
11 And ZE 3 Then
                Txtone
.Text = (3190 35) / 100.ToString
            ElseIf ZC 
11 And ZE 4 Then
                Txtone
.Text = (3250 35) / 100.ToString
            ElseIf ZC 
12 And ZE 1 Then
                Txtone
.Text = (3320 35) / 100.ToString
            ElseIf ZC 
12 And ZE 2 Then
                Txtone
.Text = (3380 35) / 100.ToString
            ElseIf ZC 
12 And ZE 3 Then
                Txtone
.Text = (3450 35) / 100.ToString
            ElseIf ZC 
12 And ZE 4 Then
                Txtone
.Text = (3530 35) / 100.ToString
            ElseIf ZC 
13 And ZE 1 Then
                Txtone
.Text = (3540 35) / 100.ToString
            ElseIf ZC 
13 And ZE 2 Then
                Txtone
.Text = (3640 35) / 100.ToString
            ElseIf ZC 
13 And ZE 3 Then
                Txtone
.Text = (3730 35) / 100.ToString
            ElseIf ZC 
13 And ZE 4 Then
                Txtone
.Text = (3830 35) / 100.ToString
            ElseIf ZC 
14 And ZE 1 Then
                Txtone
.Text = (3920 35) / 100.ToString
            ElseIf ZC 
14 And ZE 2 Then
                Txtone
.Text = (4000 35) / 100.ToString
            ElseIf ZC 
14 And ZE 3 Then
                Txtone
.Text = (4080 35) / 100.ToString
            ElseIf ZC 
14 And ZE 4 Then
                Txtone
.Text = (4160 35) / 100.ToString
            ElseIf ZC 
14 And ZE 5 Then
                Txtone
.Text = (4240 35) / 100.ToString
            ElseIf ZC 
15 And ZE 1 Then
                Txtone
.Text = (4340 35) / 100.ToString
            ElseIf ZC 
15 And ZE 2 Then
                Txtone
.Text = (4430 35) / 100.ToString
            ElseIf ZC 
15 And ZE 3 Then
                Txtone
.Text = (4520 35) / 100.ToString
            ElseIf ZC 
15 And ZE 4 Then
                Txtone
.Text = (4620 35) / 100.ToString
            ElseIf ZC 
15 And ZE 5 Then
                Txtone
.Text = (4720 35) / 100.ToString
            ElseIf ZC 
16 And ZE 1 Then
                Txtone
.Text = (4820 35) / 100.ToString
            ElseIf ZC 
16 And ZE 2 Then
                Txtone
.Text = (4920 35) / 100.ToString
            ElseIf ZC 
16 And ZE 3 Then
                Txtone
.Text = (5020 35) / 100.ToString
            ElseIf ZC 
16 And ZE 4 Then
                Txtone
.Text = (5120 35) / 100.ToString
            ElseIf ZC 
16 And ZE 5 Then
                Txtone
.Text = (5220 35) / 100.ToString
            ElseIf ZC 
17 And ZE 1 Then
                Txtone
.Text = (5340 35) / 100.ToString
            ElseIf ZC 
17 And ZE 2 Then
                Txtone
.Text = (5450 35) / 100.ToString
            ElseIf ZC 
17 And ZE 3 Then
                Txtone
.Text = (5560 35) / 100.ToString
            ElseIf ZC 
17 And ZE 4 Then
                Txtone
.Text = (5690 35) / 100.ToString
            ElseIf ZC 
17 And ZE 5 Then
                Txtone
.Text = (5810 35) / 100.ToString
            ElseIf ZC 
18 And ZE 1 Then
                Txtone
.Text = (5930 35) / 100.ToString
            ElseIf ZC 
18 And ZE 2 Then
                Txtone
.Text = (6060 35) / 100.ToString
            ElseIf ZC 
18 And ZE 3 Then
                Txtone
.Text = (6190 35) / 100.ToString
            ElseIf ZC 
18 And ZE 4 Then
                Txtone
.Text = (6320 35) / 100.ToString
            ElseIf ZC 
18 And ZE 5 Then
                Txtone
.Text = (6450 35) / 100.ToString
            ElseIf ZC 
19 And ZE 1 Then
                Txtone
.Text = (6580 35) / 100.ToString
            ElseIf ZC 
19 And ZE 2 Then
                Txtone
.Text = (6720 35) / 100.ToString
            ElseIf ZC 
19 And ZE 3 Then
                Txtone
.Text = (6860 35) / 100.ToString
            ElseIf ZC 
19 And ZE 4 Then
                Txtone
.Text = (7000 35) / 100.ToString
            ElseIf ZC 
19 And ZE 5 Then
                Txtone
.Text = (7140 35) / 100.ToString
            ElseIf ZC 
20 And ZE 1 Then
                Txtone
.Text = (7300 35) / 100.ToString
            ElseIf ZC 
20 And ZE 2 Then
                Txtone
.Text = (7460 35) / 100.ToString
            ElseIf ZC 
20 And ZE 3 Then
                Txtone
.Text = (7620 35) / 100.ToString
            ElseIf ZC 
20 And ZE 4 Then
                Txtone
.Text = (7780 35) / 100.ToString
            ElseIf ZC 
20 And ZE 5 Then
                Txtone
.Text = (7940 35) / 100.ToString
            ElseIf ZC 
And ZE 0 Then
                Txtone
.Text 0.ToString
            End 
If
 
       Catch ex As Exception
        End 
Try
End Sub 
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
إمكانية إختصار هذا الكود بدالة - بواسطة ahmedfa71 - 16-04-17, 02:33 PM

المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
Information ما هو الخطاء في الكود ProgressBar1 Mostafa201255411 1 191 26-11-25, 08:19 PM
آخر رد: asmarsou
  [VB.NET] مساعدة تعديل على الكود ZEEN4ZEEN 2 210 08-10-25, 02:20 PM
آخر رد: salamandal
Rainbow [كود] تصحيح الخطاء في الكود محمد مسافر 2 1,051 28-08-25, 09:13 AM
آخر رد: محمد مسافر
Rainbow [كود] تصحيح الخطاء في الكود محمد مسافر 0 841 27-08-25, 04:05 PM
آخر رد: محمد مسافر
  ما هو الخطأ فى هذا الكود خالد كامل1 10 1,140 28-05-25, 09:16 PM
آخر رد: خالد كامل1
  ارجو تعديل الكود بواستطة الاجراء المخزن new_programer 3 676 03-04-25, 02:44 PM
آخر رد: princelovelorn
  مساعدة في تحويل الكود من فيجوال بسيك 6 الى فيجوال دوت نت سيد أحمد 5 820 23-03-25, 10:54 PM
آخر رد: سيد أحمد
  ارجو تعديل الكود جلب البيانات عن طريق اجراء مخزن - مرفق مثال new_programer 0 620 05-02-25, 01:51 AM
آخر رد: new_programer
  ارجو تقيم الكود المرفق - جلب اعلي رقم لتسلسل نصي للباركود new_programer 4 604 30-01-25, 08:26 AM
آخر رد: new_programer
  هذا الكود لا يعمل بشكل صحيح لماذا ؟ PeterGhattas082460 3 447 21-12-24, 02:55 PM
آخر رد: aljzazy

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم