Esempio n. 1
0
        private void BtnNext_Click(object sender, EventArgs e)
        {
            addDayForDateTimePicker(1);
            setValueFormDateTimePickerForLabel(this.lblDate);
            WorkListDAO     dao          = new WorkListDAO();
            List <WorkList> ListWorkItem = dao.GetListWorkItemByDay(dateTimePickerReference.Value);

            if (ListWorkItem.Count <= 0)
            {
            }
        }
Esempio n. 2
0
        private void BtnToday_Click(object sender, EventArgs e)
        {
            dateTimePickerReference.Value = DateTime.Now.Date;
            setValueFormDateTimePickerForLabel(this.lblDate);
            WorkListDAO     dao          = new WorkListDAO();
            List <WorkList> ListWorkItem = dao.GetListWorkItemByDay(dateTimePickerReference.Value);

            if (ListWorkItem.Count <= 0)
            {
            }

            //MessageBox.Show(DateTime.Compare(result.WorkDay, dateTimePickerReference.Value).ToString());
        }
Esempio n. 3
0
        private void loadWorkItem()
        {
            WorkListDAO     dao          = new WorkListDAO();
            List <WorkList> ListWorkItem = dao.GetListWorkItemByDay(ChoosingDateTimePicker.Value);

            if (ListWorkItem.Count > 0)
            {
                foreach (WorkList workList in ListWorkItem)
                {
                    Label workItem = new Label
                    {
                        BackColor = Color.Gray,
                        ForeColor = Color.LightGray,
                        Text      = "+" + workList.WorkItem,
                        AutoSize  = true,
                        Size      = new Size(20, 20),
                        Font      = new Font("Arial", 20),
                        Margin    = new Padding(1, 1, 1, 10)
                    };
                    this.flowLayoutPanel1.Controls.Add(workItem);
                }
            }
        }