Пример #1
0
        private void btnbtnAddCountDown_Click(object sender, System.EventArgs e)
        {
            CountDownCategoriesInfo countDownInfo = new CountDownCategoriesInfo();

            countDownInfo.StartTime = Convert.ToDateTime("2015-1-1 " + this.drophours.SelectedValue.Value + ":00:00.0000000");
            countDownInfo.EndTime   = Convert.ToDateTime("2015-1-1 " + this.HourDropDownList1.SelectedValue.Value + ":00:00.0000000");

            if (System.DateTime.Compare(countDownInfo.StartTime, countDownInfo.EndTime) >= 0 && this.HourDropDownList1.SelectedValue.Value != 0)
            {
                this.ShowMsg("开始日期必须要早于结束日期", false);
                return;
            }
            countDownInfo.Title          = this.txtTitle.Text.Trim();
            countDownInfo.AdImageUrl     = CatalogHelper.UploadActiveCategorieImage(this.fileUpload.PostedFile);
            countDownInfo.AdImageLinkUrl = this.txtActiveImgUrl.Text.Trim();

            if (PromoteHelper.AddCountDownCategories(countDownInfo))
            {
                this.ShowMsg("添加限时管理成功", true);
                return;
            }
            this.ShowMsg("添加限时管理失败", true);
        }