Example #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        VSgBll  = new v_shigu_Bll();
        SgHgBll = new shiguhouguoinfo_Bll();
        SgFxBll = new shiguzereninfo_Bll();

        if (Request["method"] != null)
        {
            string method = Request["method"];
            switch (method)
            {
            case "QryList":
                GetSgFxListInfo();
                break;
            }
        }
    }
Example #2
0
    private void DelDocFileInfo()
    {
        string sgzereninfoid = Request["sgzereninfoid"];
        string doctype       = Request["doctype"];

        if (sgzereninfoid.Length > 0)
        {
            shiguzereninfo objSgZR = new shiguzereninfo_Bll().Get(Convert.ToInt32(sgzereninfoid));
            if (objSgZR != null)
            {
                string strFileName = string.Empty;
                switch (doctype)
                {
                case "事故调查报告": strFileName = objSgZR.ZR_ShiGuDiaoChaBaoGao; objSgZR.ZR_ShiGuDiaoChaBaoGao = string.Empty; break;

                case "现场调查有关资料": strFileName = objSgZR.ZR_XianChangDianChaZiLiao; objSgZR.ZR_XianChangDianChaZiLiao = string.Empty; break;

                case "损失计算材料": strFileName = objSgZR.ZR_SunShiJiSuanZiLiao; objSgZR.ZR_SunShiJiSuanZiLiao = string.Empty; break;

                case "事故认定书": strFileName = objSgZR.ZR_ShiGuRenDingShu; objSgZR.ZR_ShiGuRenDingShu = string.Empty; break;

                case "安监报二": strFileName = objSgZR.ZR_AnJianBaoEr; objSgZR.ZR_AnJianBaoEr = string.Empty; break;

                case "特派办调查报告": strFileName = objSgZR.ZR_TePaiBanDiaoChaBaoGao; objSgZR.ZR_TePaiBanDiaoChaBaoGao = string.Empty; break;

                case "深度调查报告": strFileName = objSgZR.ZR_SheDuDiaoChaBaoGao; objSgZR.ZR_SheDuDiaoChaBaoGao = string.Empty; break;

                case "其它": strFileName = objSgZR.ZR_QiTa; objSgZR.ZR_QiTa = string.Empty; break;
                }

                objSgZR = new shiguzereninfo_Bll().Save(objSgZR);

                string path = string.Format("~/docfile/{0}/{1}", objSgZR.JB_ID, strFileName);
                File.Delete(Server.MapPath(path));

                DataContractJsonSerializer json = new DataContractJsonSerializer(objSgZR.GetType());
                json.WriteObject(Response.OutputStream, objSgZR);
                Response.End();
            }
        }
    }
Example #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        VSgBll  = new v_shigu_Bll();
        SgHgBll = new shiguhouguoinfo_Bll();
        SgZrBll = new shiguzereninfo_Bll();

        if (Request["method"] != null)
        {
            string method = Request["method"];
            switch (method)
            {
            case "SaveItem":
                SaveSuZrItem();
                break;

            case "DelItem":
                DeleteSuZrItem();
                break;

            case "QryList":
                GetSgZrListInfo();
                break;

            case "SaveFile":
                UpLoadFiles();
                break;

            case "SaveUploadFileInfo":
                SaveUploadFileInfo();
                break;

            case "DelDocFileInfo":
                DelDocFileInfo();
                break;
            }
        }
    }
Example #4
0
    private void SaveUploadFileInfo()
    {
        string         sgbaseinfoid  = Request["sgbaseinfoid"];
        string         sgzereninfoid = Request["sgzereninfoid"];
        string         doctype       = Request["doctype"];
        string         filename      = Request["filename"];
        shiguzereninfo objSgZR;

        if (sgzereninfoid.Length == 0)
        {
            objSgZR = new shiguzereninfo
            {
                JB_ID                     = Convert.ToInt32(sgbaseinfoid),
                ZR_ZeRenDanWei            = string.Empty,
                ZR_ZeRenDanWeiShuXing     = string.Empty,
                ZR_ZeRenBuMen             = string.Empty,
                ZR_ZeRenChengDu           = string.Empty,
                ZR_YuanYinLeiBie          = string.Empty,
                ZR_ShiGuLeiBie            = string.Empty,
                ZR_ShiGuDengJi            = string.Empty,
                ZR_ZhiBanJianCha          = string.Empty,
                ZR_BaoGaoCiShu            = string.Empty,
                ZR_ShiGuDiaoChaBaoGao     = string.Empty,
                ZR_XianChangDianChaZiLiao = string.Empty,
                ZR_SunShiJiSuanZiLiao     = string.Empty,
                ZR_ShiGuRenDingShu        = string.Empty,
                ZR_AnJianBaoEr            = string.Empty,
                ZR_QiTa                   = string.Empty,
                ZR_TePaiBanDiaoChaBaoGao  = string.Empty,
                ZR_SheDuDiaoChaBaoGao     = string.Empty
            };
        }
        else
        {
            objSgZR = new shiguzereninfo_Bll().Get(Convert.ToInt32(sgzereninfoid));
            if (objSgZR != null)
            {
                switch (doctype)
                {
                case "事故调查报告": objSgZR.ZR_ShiGuDiaoChaBaoGao = filename; break;

                case "现场调查有关资料": objSgZR.ZR_XianChangDianChaZiLiao = filename; break;

                case "损失计算材料": objSgZR.ZR_SunShiJiSuanZiLiao = filename; break;

                case "事故认定书": objSgZR.ZR_ShiGuRenDingShu = filename; break;

                case "安监报二": objSgZR.ZR_AnJianBaoEr = filename; break;

                case "特派办调查报告": objSgZR.ZR_TePaiBanDiaoChaBaoGao = filename; break;

                case "深度调查报告": objSgZR.ZR_SheDuDiaoChaBaoGao = filename; break;

                case "其它": objSgZR.ZR_QiTa = filename; break;
                }
            }
        }
        objSgZR = new shiguzereninfo_Bll().Save(objSgZR);
        DataContractJsonSerializer json = new DataContractJsonSerializer(objSgZR.GetType());

        json.WriteObject(Response.OutputStream, objSgZR);
        Response.End();
    }