wtt
1 天以前 0a7180184d2382b87cd92b4fbe096c9c79647dfc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
 
namespace DBUtility
{
    public partial class FrmSelectDate : Form
    {
        public FrmSelectDate()
        {
            InitializeComponent();
        }
 
        public bool isSelected = false;
        public DateTime sDate;
 
        private void MC1_DateSelected(object sender, DateRangeEventArgs e)
        {
            isSelected = true;
            this.Hide();
        }
 
        private void FrmSelectDate_Activated(object sender, EventArgs e)
        {
            if (sDate < Convert.ToDateTime("1901-01-01"))
            {
                MC1.SelectionStart = DateTime.Today;
                MC1.SelectionEnd = DateTime.Today;
            }
            else
            {
                MC1.SelectionStart = sDate;
                MC1.SelectionEnd = sDate;
            }
            isSelected = false;
        }
 
 
    }
}