עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

בעיה עם הוספת שורה חדשה בעזרת Currency Manager ב- C#

Featured Replies

פורסם

יש לי בעיה עם הוספת שורה חדשה בתוכנה שאני בונה ב- C#.

התוכנה אמורה להוסיף ולעדכן שורות מטבלאות של SQL Server.

אני עובד עם DataBindings ו- CurrencyManager.

באחת מהטבלאות כל השדות הם מסוג טקסט.

בטבלה הזאת לא הייתה לי שום בעיה עם העידכון וההוספה בעזרת הפעולה AddNew() של ה- CurrencyManager.

בטבלה אחרת ישנם שדות מסוג datetime.

בשביל להציג את שדות ה- datetime השתמשתי ב- datetimepicker (הוא קצת בעייתי כי אי אפשר להשתמש בו עם null).

עשיתי binding כרגיל, והעידכון עובד טוב.

הבעיה היא עם ההוספה של שורה חדשה.

ההוספה פשוט לא פועלת והמצביע של ה- CurrencyManager נשאר על ה- position שהיה קודם לכן.

לדעתי, הבעיה קשורה ל- datetimepicker שלא יכול לקבל null ואז הוא לא יודע איזה ערך לתת בהתחלה.

מה אני עושה עכשיו כדי שההוספה תעבוד?

פורסם

תנסה לתת ערך ברירת מחדל (Default) לעמודה

של ה-datetime בטבלה, למשל הזמן והתאריך הנוכחיים

באמצעות הפונקציה gettime או משהו בסגנון, לא זוכר את ה-syntax המדוייק

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.