protected void btnExperiment_Click(object sender, EventArgs e) { int experimentResourceId = int.Parse(Request["experimentResourceId"]); UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo(); DalOperationAboutExperiment DalOperationAboutExperiment = new DalOperationAboutExperiment(); Experiments experiment = new Experiments { studentNo = UserCookiesInfo.userNo, experimentResourceId = experimentResourceId, updateTime = DateTime.Now, }; if (hidAttachmentId.Value.CompareTo(string.Empty) != 0) { experiment.attachmentId = hidAttachmentId.Value; } else { Javascript.Alert("请上传附件!", Page); return; } DalOperationAboutExperiment.SubmitExperiment(experiment); Javascript.AlertAndRedirect("提交成功!", "CInfoExperiment.aspx?experimentResourceId=" + experiment.experimentResourceId + "&courseNo=" + Request["courseNo"] + "&classID=" + Server.UrlEncode(Server.UrlDecode(Request["classID"])) + "&termtag=" + Request["termtag"], Page); }
protected void submitExpriment_Click(object sender, EventArgs e) { UserCookiesInfo UserCookiesInfo = BllOperationAboutUser.GetUserCookiesInfo(); DalOperationAboutExperiment DalOperationAboutExperiment = new DalOperationAboutExperiment(); Experiments experiment = new Experiments { studentNo = UserCookiesInfo.userNo, experimentResourceId = experimentResourceId, updateTime = DateTime.Now, }; if (hidAttachmentId.Value.CompareTo(string.Empty) != 0) { experiment.attachmentId = hidAttachmentId.Value; } else { Javascript.Alert("请上传附件!", Page); return; } DalOperationAboutExperiment.SubmitExperiment(experiment); Javascript.RefreshParentWindow("提交成功!","haha", Page); }