Beispiel #1
0
        private void button_2_Click(object sender, EventArgs e)
        {
            string[] shortDateString;
            DateTime today;

            if (Configs.CmsName == "Qiwen")
            {
                TextBox textBox0 = this.textBox_0;
                shortDateString    = new string[] { "SELECT * FROM [Ws_BookList] WHERE bookupdatetime BETWEEN '", null, null, null, null };
                today              = DateTime.Today;
                shortDateString[1] = today.ToShortDateString();
                shortDateString[2] = "' AND '";
                today              = DateTime.Today.AddDays(1);
                shortDateString[3] = today.ToShortDateString();
                shortDateString[4] = "' ORDER BY bookupdatetime ASC";
                textBox0.Text      = string.Concat(shortDateString);
            }
            else if (Configs.CmsName == "Jieqi")
            {
                TextBox textBox = this.textBox_0;
                shortDateString = new string[] { "SELECT * FROM `jieqi_article_article` WHERE `lastupdate` BETWEEN '", null, null, null, null };
                int time = FormatText.GetTime(DateTime.Today);
                shortDateString[1] = time.ToString();
                shortDateString[2] = "' AND '";
                today = DateTime.Today;
                time  = FormatText.GetTime(today.AddDays(1));
                shortDateString[3] = time.ToString();
                shortDateString[4] = "' ORDER BY `lastupdate` ASC";
                textBox.Text       = string.Concat(shortDateString);
            }
            else if (Configs.CmsName != "Cnend")
            {
                this.textBox_0.Text = Localization.Get("请输入SQL语句");
            }
            else
            {
                TextBox textBox01 = this.textBox_0;
                shortDateString = new string[] { "SELECT * FROM [list_book] WHERE list_gxdate BETWEEN ", null, null, null, null };
                decimal value = this.numericUpDown_1.Value;
                shortDateString[1] = value.ToString();
                shortDateString[2] = " AND ";
                value = this.numericUpDown_0.Value;
                shortDateString[3] = value.ToString();
                shortDateString[4] = " ORDER BY list_gxdate ASC";
                textBox01.Text     = string.Concat(shortDateString);
            }
        }
 private void button_1_Click(object sender, EventArgs e)
 {
     this.numericUpDown_0.Value = FormatText.GetTime(this.dateTimePicker_0.Value);
 }
 private void button_0_Click(object sender, EventArgs e)
 {
     this.dateTimePicker_0.Value = FormatText.GetTime((long)Convert.ToInt32(this.numericUpDown_0.Value));
 }