Beispiel #1
0
    private void SaveUploadFileInfo()
    {
        string sgztbaseid = Request["sgztbaseid"];
        string zttype     = Request["zttype"];
        string filename   = Request["filename"];
        string filedesc   = Request["filedesc"];

        if (sgztbaseid.Length > 0)
        {
            shiguzhuantiinfo objSgZt = new shiguzhuantiinfo
            {
                JB_ID           = Convert.ToInt32(sgztbaseid),
                ZT_Type         = zttype,
                ZT_FilePath     = filename,
                ZT_Desc         = filedesc,
                ZT_CreateUserID = SysUser.User_ID,
                ZT_CreateUser   = SysUser.User_Name,
                ZT_CreateTime   = DateTime.Now
            };
            objSgZt = new shiguzhuantiinfo_Bll().Add(objSgZt);

            DataContractJsonSerializer json = new DataContractJsonSerializer(objSgZt.GetType());
            json.WriteObject(Response.OutputStream, objSgZt);
            Response.End();
        }
    }
Beispiel #2
0
    private void ShowUploadFileInfo()
    {
        string sgztbaseid = Request["sgztbaseid"];

        if (sgztbaseid.Length > 0)
        {
            List <shiguzhuantiinfo> listZt = new shiguzhuantiinfo_Bll().GetByFilter(new List <Filter> {
                new Filter()
                {
                    Name = "JB_ID", Op = FilterOp.Equals, Value = Convert.ToInt32(sgztbaseid)
                }
            });
            DataContractJsonSerializer json = new DataContractJsonSerializer(listZt.GetType());
            json.WriteObject(Response.OutputStream, listZt);
            Response.End();
        }
    }