private void setUpBaseRightInfo(XmlConfigMaker c) { XmlConfig cfg = loadXmlConfig("RightList.xml", c, false); int count = cfg.getCount(); string[] arr = new string[] { "op", "svr", "td", "data", "fish", "crod", "dice", "bacc", "cow", "d5", "shcd", "calf", "other" }; for (int i = 0; i < arr.Length; i++) { List <Dictionary <string, object> > data = cfg.getTable(arr[i]); if (data != null) { for (int k = 0; k < data.Count; k++) { RightBaseInfo info = new RightBaseInfo(); info.m_category = arr[i]; info.m_rightId = Convert.ToString(data[k]["rightId"]); info.m_rightName = Convert.ToString(data[k]["name"]); m_baseRight.Add(info.m_rightId, info); } } } }
string getErrorURL(string rightId) { RightBaseInfo info = ResMgr.getInstance().getBaseRightInfo(rightId); if (info == null) { return(""); } string url = ""; switch (info.m_category) { case "op": { url = "~/appaspx/operation/Error.aspx"; } break; case "svr": { url = "~/appaspx/service/Error.aspx"; } break; case "td": { url = "~/appaspx/td/Error.aspx"; } break; case "data": { url = "~/appaspx/stat/Error.aspx"; } break; case "fish": { url = "~/appaspx/stat/fish/Error.aspx"; } break; case "crod": { url = "~/appaspx/stat/crocodile/Error.aspx"; } break; case "dice": { url = "~/appaspx/stat/dice/Error.aspx"; } break; case "bacc": { url = "~/appaspx/stat/baccarat/Error.aspx"; } break; case "cow": { url = "~/appaspx/stat/cows/Error.aspx"; } break; case "d5": { url = "~/appaspx/stat/5dragons/Error.aspx"; } break; case "shcd": { url = "~/appaspx/stat/shcd/Error.aspx"; } break; case "calf": { } break; case "other": { } break; } return(url); }