• 大小: 3.23MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-28
  • 语言: C#
  • 标签:

资源简介

asp.net完整酒店管理系统源码asp.net完整酒店管理系统源码asp.net完整酒店管理系统源码

资源截图

代码片段和文件信息

using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Web.script.Serialization;
using System.Runtime.Serialization;

/// 
/// JSonhelper 的摘要说明
/// 

public class DTreeJSonhelper
{
    //对应JSON的singleInfo成员
    public string singleInfo = string.Empty;

    protected string _error = string.Empty;
    protected bool _success = true;
    protected long _totalCount = 0;
    protected System.Collections.ArrayList arrData = new ArrayList();
    protected System.Collections.ArrayList arrDataItem = new ArrayList();


    public DTreeJSonhelper()
    {

    }

    //public static string ToJSON(object obj)
    //{
    //    javascriptSerializer serializer = new javascriptSerializer();
    //    return serializer.Serialize(obj);
    //}

    //public static string ToJSON(object obj int recursionDepth)
    //{
    //    javascriptSerializer serializer = new javascriptSerializer();
    //    serializer.RecursionLimit = recursionDepth;
    //    return serializer.Serialize(obj);
    //}

    //对应于JSON的success成员
    public bool success
    {
        get
        {
            return _success;
        }
        set
        {
            //如设置为true则清空error
            if (success) _error = string.Empty;
            _success = value;
        }
    }

    //对应于JSON的error成员
    public string error
    {
        get
        {
            return _error;
        }
        set
        {
            //如设置error,则自动设置success为false
            if (value != ““) _success = false;
            _error = value;
        }
    }

    public long totlalCount
    {
        get { return _totalCount; }
        set { _totalCount = value; }
    }


    //重置,每次新生成一个json对象时必须执行该方法
    public void Reset()
    {
        _success = true;
        _error = string.Empty;
        singleInfo = string.Empty;
        arrData.Clear();
        arrDataItem.Clear();
    }



    public void AddItem(string name string value)
    {
        if (name == “leaf“ && value==“1“)
        {
            value = “true“;
            arrData.Add(““ + name + “:“ + ““ + value + ““);
        }
        else if (name == “leaf“ && value == “0“)
        {
            value = “false“;
            arrData.Add(““ + name + “:“ + ““ + value + ““);
        }
        else
        {
            arrData.Add(““ + name + “:\““ + ““ + value + “\““);
        }
       
    }



    public void ItemOk()
    {
        arrData.Add(“
“);
        //返回总记录条数
        totlalCount++;
    }

    //序列化JSON对象,得到返回的JSON代码
    public override string ToString()
    {
        StringBuilder sb = new StringBuilder();
        sb.Append(“[“);
       
        int index = 0;
        sb.Append(“{“);
        if (arrData.Count <= 0)
        {
            sb.Append(“}“);
        }
        else
        {
            foreach (string val in arrData)
            {
 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      36864  2008-10-15 19:01  ExjsHotel\BLL\bin\Debug\BLL.dll

     文件      87552  2008-10-15 19:01  ExjsHotel\BLL\bin\Debug\BLL.pdb

     文件      36864  2008-10-05 10:39  ExjsHotel\BLL\bin\Debug\DAL.dll

     文件      67072  2008-10-05 10:39  ExjsHotel\BLL\bin\Debug\DAL.pdb

     文件      24576  2008-10-05 09:32  ExjsHotel\BLL\bin\Debug\Model.dll

     文件      77312  2008-10-05 09:32  ExjsHotel\BLL\bin\Debug\Model.pdb

     文件     701816  2007-01-20 17:56  ExjsHotel\BLL\bin\Debug\System.Web.Extensions.dll

     目录          0  2008-10-16 07:59  ExjsHotel\BLL\bin\Debug

     目录          0  2008-09-17 20:25  ExjsHotel\BLL\bin

     文件       3532  2008-10-05 09:36  ExjsHotel\BLL\BLL.csproj

     文件       3803  2008-09-21 21:28  ExjsHotel\BLL\DTreeJSonhelper.cs

     文件       3519  2008-09-21 21:28  ExjsHotel\BLL\FormJSonhelper.cs

     文件       3631  2008-09-21 21:28  ExjsHotel\BLL\GridJSonhelper.cs

     文件       1668  2008-09-30 21:57  ExjsHotel\BLL\GuestInfoBLL.cs

     文件       3576  2008-09-29 21:10  ExjsHotel\BLL\JSonhelper.cs

     文件       1356  2008-09-18 18:37  ExjsHotel\BLL\NavBLL.cs

     文件        242  2008-09-24 15:24  ExjsHotel\BLL\obj\BLL.csproj.FileList.txt

     文件       2669  2008-10-15 19:01  ExjsHotel\BLL\obj\BLL.csproj.FileListAbsolute.txt

     文件      36864  2008-10-15 19:01  ExjsHotel\BLL\obj\Debug\BLL.dll

     文件      87552  2008-10-15 19:01  ExjsHotel\BLL\obj\Debug\BLL.pdb

     文件      16384  2008-09-19 12:21  ExjsHotel\BLL\obj\Debug\Refactor\BLL.dll

     目录          0  2008-10-16 07:59  ExjsHotel\BLL\obj\Debug\Refactor

     文件     133894  2008-10-17 12:37  ExjsHotel\BLL\obj\Debug\ResolveAssemblyReference.cache

     目录          0  2008-09-17 20:25  ExjsHotel\BLL\obj\Debug\TempPE

     目录          0  2008-10-17 12:37  ExjsHotel\BLL\obj\Debug

     目录          0  2008-10-16 07:59  ExjsHotel\BLL\obj

     文件       1749  2008-09-22 11:37  ExjsHotel\BLL\OpenRoomInfoBLL.cs

     文件       3033  2008-09-29 22:40  ExjsHotel\BLL\OpenRoomRecordInfoBLL.cs

     文件        170  2008-09-15 21:05  ExjsHotel\BLL\OrderRoomInfoBLL.cs

     文件       1325  2008-09-15 08:46  ExjsHotel\BLL\Properties\AssemblyInfo.cs

............此处省略1256个文件信息

评论

共有 条评论

相关资源