private void GetDetailWordInfo() { _ClientInfo = new ClientInfo(); Hashtable _MetaHash = new Hashtable(); Hashtable _Detail = new Hashtable(); try { String _FKey = base.GetQueryValue("FKey"); String _ResxType = base.GetQueryValue("CultureType"); ResxManagerInfo _ResxCtrl = new ResxManagerInfo(); DataSet _DS = _ResxCtrl.GetDetailWordInfo(_FKey, _ResxType); _MetaHash.Add("DetailInfo", MetaDataInfo.GetListHashData(_DS)); _ClientInfo.Status = true; } catch (Exception ex) { _ClientInfo.Status = false; _ClientInfo.Message = "数据访问失败,请稍候再试!"; } Hashtable _Hash = new Hashtable(); _Hash.Add(CONST_COMMON.ClientInfo, _ClientInfo); _Hash.Add(CONST_COMMON.Meta, _MetaHash); String _Context = MetaDataInfo.GetClientMetaData <Hashtable>(_Hash); HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "application/json"; HttpContext.Current.Response.Write(_Context); HttpContext.Current.Response.End(); }
protected void btSearch_Click(object sender, EventArgs e) { this.ClearCtrlInfo(); String _Word = String.Empty; String _FKey = String.Empty; String _sysName = sltSysName.Value; String _sltSearchField = sltSearchField.Value; String _txtSearch = txtSearch.Text.Trim(); ResxManagerInfo _ResxCtrl = new ResxManagerInfo(); DataSet _DSInfo = _ResxCtrl.GetWordInfo(_sysName, String.Format(" {0}=N'{1}'", _sltSearchField, _txtSearch)); if (_DSInfo != null && _DSInfo.Tables.Count > 0 && _DSInfo.Tables[0].Rows.Count > 0) { _FKey = _DSInfo.Tables[0].Rows[0]["FKey"].ToString().Trim(); _Word = _DSInfo.Tables[0].Rows[0]["FValue"].ToString().Trim(); } if (String.IsNullOrEmpty(_FKey)) { return; } txtFkey.Value = _FKey; txtWord.Value = _Word; DataSet _DS = _ResxCtrl.GetDetailWordInfo(_FKey, ""); if (_DS != null && _DS.Tables.Count > 0 && _DS.Tables[0].Rows.Count > 0) { foreach (DataRow _Row in _DS.Tables[0].Rows) { String _Type = _Row["Resx_Type"].ToString().Trim(); if (String.Equals(_Type, CultureType.ZH_CN, StringComparison.CurrentCultureIgnoreCase)) { txtCN.Value = _Row["Resx_Text"].ToString().Trim(); } if (String.Equals(_Type, CultureType.ZH_TW, StringComparison.CurrentCultureIgnoreCase)) { txtTW.Value = _Row["Resx_Text"].ToString().Trim(); } if (String.Equals(_Type, CultureType.EN_US, StringComparison.CurrentCultureIgnoreCase)) { txtEN.Value = _Row["Resx_Text"].ToString().Trim(); } } } CreateResx _CreateResx = new CreateResx(); txtCSharp.Value = _CreateResx.GetCSharpCode(_FKey, _Word); txtJScript.Value = _CreateResx.GetJScriptCode(_FKey, _Word); sltSysName.Value = _sysName; }