//提交事件 protected void btnSubmit_Click(object sender, EventArgs e) { if (this.imgPhotoFM.ImageUrl == "~/uploadworkphoto/blank.png") { Alert.ShowInParent("请上传封面图片"); return; } if (this.imgPhotoNR.ImageUrl == "~/uploadworkphoto/blank.png") { Alert.ShowInParent("请上传内容图片"); return; } int flag = 0; int id = RequestHelper.GetRequestInt("id", 0); if (id > 0) { flag = operate.UpdatePublish(id, txtTitle.Text, ddlTtype.SelectedValue, ddlCtype.SelectedValue, chkFlag.Checked, htmlContent.Text, imgPhotoFM.ImageUrl, imgPhotoNR.ImageUrl); } else { flag = operate.InsertPublish(txtTitle.Text, ddlTtype.SelectedValue, ddlCtype.SelectedValue, chkFlag.Checked, htmlContent.Text, imgPhotoFM.ImageUrl, imgPhotoNR.ImageUrl); } if (flag >= 1) { PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); Alert.ShowInParent("保存成功"); } else { Alert.ShowInParent("保存失败"); } }