protected void BindGradeCheckNotify() { StudentsGradeCheckConfig model = new StudentsGradeCheckConfig { notifyTitle = string.Empty, notifyContent = string.Empty }; DalOperationAboutGradeCheck dos = new DalOperationAboutGradeCheck(); DataTable dt = dos.GetGradeCheckDocument().Tables[0]; for (int i = 0; i < dt.Rows.Count; i++) { model.notifyTitle = dt.Rows[i]["notifyTitle"].ToString().Trim(); model.notifyContent = dt.Rows[i]["notifyContent"].ToString().Trim(); model.attachmentIds = dt.Rows[i]["attachmentIds"].ToString().Trim(); } txtNotifyTitle.Text = model.notifyTitle; txtNotifyContent.Text = model.notifyContent; hidAttachmentId.Value = model.attachmentIds; if (model.attachmentIds.Length > 0) { DalOperationAttachments dalOperationAttachments = new DalOperationAttachments(); spanAttachment.InnerHtml = dalOperationAttachments.GetAttachmentsList(model.attachmentIds, ref iframeCount, true, string.Empty); } }
protected void BindGradeCheckAllowTime() { DateTime now = DateTime.Now; StudentsGradeCheckConfig model = new StudentsGradeCheckConfig { startTime = now, endTime = now }; DalOperationAboutGradeCheck dos = new DalOperationAboutGradeCheck(); DataTable dt = dos.GetGradeCheckAllowTime().Tables[0]; for (int i = 0; i < dt.Rows.Count; i++) { model.startTime = Convert.ToDateTime(dt.Rows[i]["startTime"].ToString().Trim()); model.endTime = Convert.ToDateTime(dt.Rows[i]["endTime"].ToString().Trim()); } startTime.Value = model.startTime.ToString("yyyy-MM-dd HH:mm:ss"); endTime.Value = model.endTime.ToString("yyyy-MM-dd HH:mm:ss"); }