- [DEVEXPRESS] Hướng dẫn bật tính năng Scroll Pixcel in Touch trên GridView
- [DEVEXPRESS] Hướng dẫn sử dụng TileBar viết ứng dụng duyệt hình ảnh Winform
- [DEVEXPRESS] Tô màu border TextEdit trên Winform
- [C#] Lấy dữ liệu từ Console Write hiển thị lên textbox Winform
- [C#] Hiển thị Progress bar trên Window Console
- [C#] Di chuyển control Runtime và lưu layout trên winform
- [SQLSERVER] Sử dụng hàm NULL IF
- [C#] Chia sẽ source code mã đi tuần bằng giao diện Winform
- [C#] Flash Window in Taskbar Winform
- Download và Giải nén tập tin File sử dụng Powershell
- [C#] Hướng dẫn cách lấy thông tin đăng nhập tài khoản và mật khẩu web browser trên windows
- [VB.NET] CRUD Thêm xóa sửa tìm kiếm Realtime FireBase
- [C#] Hiển thị thông báo Toast Message trong lập trình Winform
- [C#] Cấu hình định dạng ngày tháng, thời gian trên Windows cho ứng dụng Winform
- [C#] Rút gọn đường dẫn link url với TinyURL API
- [C#] Hướng dẫn cách bo tròn winform with Radius
- [C#] Chia sẽ class BackGroundOverlay Show Modal cho Winform
- [C#] Hướng dẫn Flip Image Winform
- [C#] Invoke là gì? cách sử dụng phương thức Invoke()
- [C#] Hướng dẫn chia sẽ file, folder từ ứng dụng sang Zalo Chat
[DEVEXPRESS] Hướng dẫn sử dụng Schedule Control hiển thị giờ làm việc nhân viên VB.NET
Bài viết hôm nay, mình sẽ hướng dẫn các bạn sử dụng công cụ Schedule Control trong Devexpress bằng ngôn ngữ VB.NET, để hiển thị giờ ra vào làm việc của nhân viên.
Chức năng này có thể giúp bạn phần nào hiển thị cho phần mềm nhân sự có thể xem theo tháng làm việc của từng nhân viên trong công ty của mình.
Giao diện demo của ứng dụng:
Source code VB.NET
Imports System.ComponentModel
Imports System.Text
Imports DevExpress.XtraScheduler
Partial Public Class Form1
Shared Sub New()
DevExpress.UserSkins.BonusSkins.Register()
DevExpress.Skins.SkinManager.EnableFormSkins()
End Sub
Public Sub New()
InitializeComponent()
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SchedulerControl2.ActiveViewType = DevExpress.XtraScheduler.SchedulerViewType.Month
SchedulerControl2.OptionsCustomization.AllowInplaceEditor = DevExpress.XtraScheduler.UsedAppointmentType.None
' đặt load đầu tháng
SchedulerControl2.Start = New DateTime(2017, 6, 1)
' Hiển thị lịch làm việc thời gian nhân viên
For i As Integer = 0 To 29
Dim app As Appointment = SchedulerStorage1.CreateAppointment(AppointmentType.Normal)
Dim start As New DateTime(2017, 6, 1 + i, 7, 30, 0)
Dim [end] As New DateTime(2017, 6, 1 + i, 11, 30, 0)
app.Start = start
app.[End] = [end]
app.Description = "Ca sáng"
'SchedulerStorage1.Appointments.Labels.Clear()
app.LabelKey = 3
app.StatusKey = 1
app.AllDay = False
SchedulerStorage1.Appointments.Add(app)
' thời điểm 2
Dim app2 As Appointment = SchedulerStorage1.CreateAppointment(AppointmentType.Normal)
Dim start2 As New DateTime(2017, 6, 1 + i, 12, 30, 0)
Dim [end2] As New DateTime(2017, 6, 1 + i, 16, 30, 0)
app2.Start = start2
app2.[End] = [end2]
app2.Description = "Ca chiều"
app2.LabelKey = 1
'SchedulerStorage1.Appointments.Labels.Clear()
'app2.AllDay = False
'SchedulerStorage1.Appointments.Labels.Add(System.Drawing.Color.FromArgb((CInt((CByte(255)))), (CInt((CByte(194)))), (CInt((CByte(190))))), "Important", "&Important")
SchedulerStorage1.Appointments.Add(app2)
Next
End Sub
End Class
Và dưới đây là bảng màu để cho các bạn set color label
CHÚC CÁC BẠN THÀNH CÔNG!