Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request["courseNo"] == null||!CommonUtility.SafeCheckByParams<string>(Request["schoolworkNotifyId"], ref schoolworkNotifyId))
        {
            Javascript.GoHistory(-1, Page);
            return;
        }

        if (!IsPostBack)
        {
            DalOperationAboutCourses dalOperationAboutCourses = new DalOperationAboutCourses();
            schoolWorkNotify = dalOperationAboutCourses.GetSchoolworkNotifyById(schoolworkNotifyId);
            this.txtTitle.Text = schoolWorkNotify.schoolWorkNotifyTitle;
            this.Textarea1.Value = schoolWorkNotify.schoolWorkNotifyContent;
            datepicker.Value = schoolWorkNotify.deadline.ToString("yyyy-MM-dd HH:mm:ss");
            if (schoolWorkNotify.isOnline)
                this.ddltOnline.SelectedValue = "true";
            else
                this.ddltOnline.SelectedValue = "false";

            hidAttachmentId.Value = schoolWorkNotify.attachmentIds;
            if (schoolWorkNotify.attachmentIds.Length > 0)
            {
                DalOperationAttachments dalOperationAttachments = new DalOperationAttachments();
                ltlAttachment.Text = dalOperationAttachments.GetAttachmentsList(schoolWorkNotify.attachmentIds, ref iframeCount, true,string.Empty);
            }
        }
    }