protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        NewsInfo news = new NewsInfo();

        news.N_Title   = txtTitle.Text.Trim();
        news.N_From    = "河南省高速公路路警联合指挥中心";
        news.N_Content = txtContent.Text;
        news.N_ImgPath = "";
        news.N_ImgView = "";
        news.N_HotIco  = "";
        news.N_PicIco  = "";
        news.N_Time    = txtTime.Text;
        news.N_TID     = Convert.ToInt32(((DataTable)ViewState["dtType"]).Rows[0]["T_ID"]);
        if (ViewState["strAction"].ToString() == "update")
        {
            news.N_ID = Convert.ToInt32(ViewState["nid"]);
            NewsInfoService.Update_NewsInfoWithTime(news);
        }
        else if (ViewState["strAction"].ToString() == "add")
        {
            NewsInfoService.Insert_NewsInfoWithTime(news);
        }
        if (Convert.ToInt32(((DataTable)ViewState["dtType"]).Rows[0]["T_ID"]) == 80)
        {
            CommonFunction.AlertAndRedirect(Literal1, "操作成功", "CurrentRoadContion.aspx?tid=" + Convert.ToInt32(((DataTable)ViewState["dtType"]).Rows[0]["T_ID"]));
        }
        else if (Convert.ToInt32(((DataTable)ViewState["dtType"]).Rows[0]["T_ID"]) == 81)
        {
            CommonFunction.AlertAndRedirect(Literal1, "操作成功", "HistoryRoadCondition.aspx?tid=" + Convert.ToInt32(((DataTable)ViewState["dtType"]).Rows[0]["T_ID"]));
        }
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        if (ViewState["strAction"].ToString() == "add" || FileUploadHTML.HasFile)
        {
            string fileName = CommonFunction.Get_DynamicString() + FileUploadHTML.FileName;
            string filePath = Server.MapPath("~/workexpress/" + fileName);
            if (!CommonFunction.Is_FileUploadSuccessfully(FileUploadHTML, Literal1, filePath, new string[] { ".html", "htm", "shtml" }))
            {
                return;
            }
            ViewState["HTML"] = fileName;
        }

        NewsInfo news = new NewsInfo();

        news.N_Title   = txtTitle.Text;
        news.N_From    = txtFrom.Text;
        news.N_Content = "";
        news.N_ImgPath = ViewState["HTML"].ToString();
        news.N_ImgView = "";
        news.N_HotIco  = "";
        news.N_PicIco  = "";
        news.N_Time    = txtTime.Text;
        news.N_TID     = Convert.ToInt32(((DataTable)ViewState["dtType"]).Rows[0]["T_ID"]);
        if (ViewState["strAction"].ToString() == "update")
        {
            news.N_ID = Convert.ToInt32(ViewState["nid"]);
            NewsInfoService.Update_NewsInfoWithTime(news);
        }
        else if (ViewState["strAction"].ToString() == "add")
        {
            NewsInfoService.Insert_NewsInfoWithTime(news);
        }
        CommonFunction.AlertAndRedirect(Literal1, "操作成功", "WorkExpressMgr.aspx?tid=" + Convert.ToInt32(((DataTable)ViewState["dtType"]).Rows[0]["T_ID"]));
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        string   strContent = Request.Form["t_contents"].ToString();
        NewsInfo news       = new NewsInfo();

        news.N_Title   = txtTitle.Text;
        news.N_From    = txtFrom.Text;
        news.N_Content = PubClass.Tool.CheckStr(strContent);
        news.N_ImgPath = "";
        news.N_ImgView = "";
        news.N_HotIco  = "";
        news.N_PicIco  = "";
        news.N_Time    = txtTime.Text;
        news.N_TID     = Convert.ToInt32(((DataTable)ViewState["dtType"]).Rows[0]["T_ID"]);
        if (ViewState["strAction"].ToString() == "update")
        {
            news.N_ID = Convert.ToInt32(ViewState["nid"]);
            NewsInfoService.Update_NewsInfoWithTime(news);
        }
        else if (ViewState["strAction"].ToString() == "add")
        {
            NewsInfoService.Insert_NewsInfoWithTime(news);
        }
        CommonFunction.AlertAndRedirect(Literal1, "操作成功", "CommonNewsMgr.aspx?tid=" + Convert.ToInt32(((DataTable)ViewState["dtType"]).Rows[0]["T_ID"]));
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        string strContent = Request.Form["t_contents"].ToString();

        if (cboxPic.Checked)
        {
            if (ViewState["strAction"].ToString() == "add" && (!FUploadImg.HasFile || !FUploadView.HasFile))
            {
                CommonFunction.Alert(Literal1, "请上传缩略图和图片!");
                return;
            }
            string fileName  = CommonFunction.Get_DynamicString() + FUploadImg.FileName;
            string vfileName = CommonFunction.Get_DynamicString() + FUploadView.FileName;
            string filePath  = Server.MapPath("~/newsimages/" + fileName);
            string vfilePath = Server.MapPath("~/newsimages/" + vfileName);
            if (FUploadImg.HasFile)
            {
                if (!CommonFunction.Is_FileUploadSuccessfully(FUploadImg, Literal1, filePath, new string[] { ".gif", ".jpg", ".jpeg" }))
                {
                    return;
                }
                ViewState["ImgPath"] = fileName;
            }
            if (FUploadView.HasFile)
            {
                if (!CommonFunction.Is_FileUploadSuccessfully(FUploadView, Literal1, vfilePath, new string[] { ".gif", ".jpg", ".jpeg" }))
                {
                    return;
                }
                ViewState["ImgView"] = vfileName;
            }
            ViewState["ImgIco"] = "图片新闻";
        }
        NewsInfo news = new NewsInfo();

        news.N_Title   = txtTitle.Text;
        news.N_From    = txtFrom.Text;
        news.N_Content = PubClass.Tool.CheckStr(strContent);
        news.N_ImgPath = ViewState["ImgPath"].ToString();
        news.N_ImgView = ViewState["ImgView"].ToString();
        news.N_HotIco  = txtRemarkContent.Text.Trim();
        news.N_PicIco  = ViewState["ImgIco"].ToString();
        news.N_Time    = txtTime.Text;
        news.N_TID     = Convert.ToInt32(((DataTable)ViewState["dtType"]).Rows[0]["T_ID"]);
        if (ViewState["strAction"].ToString() == "update")
        {
            news.N_ID = Convert.ToInt32(ViewState["nid"]);
            NewsInfoService.Update_NewsInfoWithTime(news);
        }
        else if (ViewState["strAction"].ToString() == "add")
        {
            NewsInfoService.Insert_NewsInfoWithTime(news);
        }
        CommonFunction.AlertAndRedirect(Literal1, "操作成功", "ImageTextRemarkNewsMgr.aspx?tid=" + Convert.ToInt32(((DataTable)ViewState["dtType"]).Rows[0]["T_ID"]));
    }