示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //פונקציות שרצות בעת הטעינה הראשונית של הדף
            if (!IsPostBack)
            {
                //קריאה ארבע פעמים לפונקציה שמאתחלת נתונים בתוך רשימה נפתחת
                getDdlSource(companyDdl, "CompanysTable", "CompanyId", "CompanyName", "חברה נוספת");
                getDdlSource(ddlCity, "CityTable", "CityId", "CityName", " עיר נוספת ");
                getDdlSource(carLevelDdl, "CarLevelTable", "IdLevel", "LevelName", " דרגת רכב נוסף ");
                getDdlSource(companyDdl1, "CompanysTable", "CompanyId", "CompanyName", "");

                //הבאת נתונים מצד השרת ושתילתו בתוך משתנים בצד הלקוח
                string[] arr = GlobFuncs.getUnreadChats();
                ltlAllOrders.Text    = "<script>var allOrders = " + GlobFuncs.getAllOrders() + "</script>";
                ltlAllCustomers.Text = "<script>var allCustomers= " + GlobFuncs.getAllCustomers() + "</script>";
                ltlChatsUnread.Text  = "<script>var chatsUnread = " + arr[0] + "</script>";

                //פונקציה הבודקת אם המשתמש רשום או אינו מורשה לגשת לדף זה
                checkeIsAdmin();
            }
        }