コード例 #1
0
    //提交
    protected void btn_Save_Click(object sender, EventArgs e)
    {
        string strFlag = Verify();

        if (strFlag != "")
        {
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "click", "alert('" + strFlag + "');", true);
            // return;
        }
        else
        {
            Entity.AccessReport entity = new Entity.AccessReport();

            entity.CreateDate = DateTime.Now;                                         //创建时间
            entity.CreateUser = Request.Cookies["Cookies"].Values["u_id"].ToString(); //创建人


            entity.tkflag   = 0;
            entity.StatusID = 4;    //

            entity.backflag = 0;
            DAl.Report reportobj = new DAl.Report();
            // entity.ReportNO = txt_ReportNO.Text.Trim();
            entity.Remark = txt_Remark3.Text.Trim();

            entity.ID = int.Parse(strReportId);
            if (reportobj.UpateXCJC(entity) == 1)
            {
                WebApp.Components.Log.SaveLog("现场监测保存成功!", Request.Cookies["Cookies"].Values["u_id"].ToString(), 5);
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "clickAddSuccess", "hiddenDetail();alert('数据保存成功!')", true);
            }
            else
            {
                WebApp.Components.Log.SaveLog("现场监测编辑失败!", Request.Cookies["Cookies"].Values["u_id"].ToString(), 5);
                ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "clickAddFail", "alert('数据添保存失败!')", true);
            }
        }
        Query();
    }
コード例 #2
0
    protected void btn_back_Click(object sender, EventArgs e)
    {
        //保存项目信息项目
        Entity.AccessReport entity    = new Entity.AccessReport();
        DAl.Report          reportobj = new DAl.Report();

        //现场监测保存
        entity.ReportNO   = "";                                                   //
        entity.CreateDate = DateTime.Now;                                         //创建时间
        entity.CreateUser = Request.Cookies["Cookies"].Values["u_id"].ToString(); //创建人
        if (ck_fa.Checked)
        {
            entity.StatusID = 3;//保存
        }
        else
        {
            entity.StatusID = 1.5;
        }
        entity.backflag = 1;
        entity.Remark   = txt_Remark3.Text.Trim();
        entity.ID       = int.Parse(strReportId);

        if (reportobj.UpateXCJC(entity) == 1)
        {
            WebApp.Components.Log.SaveLog("现场监测退回保存成功!", Request.Cookies["Cookies"].Values["u_id"].ToString(), 4);



            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "clickAddSuccess", "hiddenDetail();alert('现场监测退回保存成功!')", true);
        }
        else
        {
            WebApp.Components.Log.SaveLog("现场监测退回保存失败!", Request.Cookies["Cookies"].Values["u_id"].ToString(), 4);
            ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "clickAddFail", "alert('现场监测退回保存失败!')", true);
        }
        Query();
    }