public override string ToString() { if (this is IEditorID && (this as IEditorID).EditorID != null && (this as IEditorID).EditorID.Value != "") { return((this as IEditorID).EditorID.Value); } else { return(String.Format("{0} - {1}", Tag, FormID.ToString())); } }
public override string ToString() { String Moves = ""; String Levels = ""; for (int i = 0; i < MoveLevels.Length; i++) { Moves = Moves + MoveList[i].ToString() + "¶"; Levels = Levels + MoveLevels[i].ToString() + "¶"; } Moves = Moves + "65535"; Levels = Levels + "65535" + "¶"; return(ID + "¶" + Name + "¶" + BaseHP.ToString() + "¶" + BaseAttack.ToString() + "¶" + BaseDefense.ToString() + "¶" + BaseSpecialAttack.ToString() + "¶" + BaseSpecialDefense.ToString() + "¶" + BaseSpeed.ToString() + "¶" + ((int)LevelingType).ToString() + "¶" + FormID.ToString() + "¶" + GenderValue.ToString() + "¶" + ((int)Type1).ToString() + "¶" + ((int)Type2).ToString() + "¶" + CatchRate.ToString() + "¶" + ExpYield.ToString() + "¶" + EffortYield.ToString() + "¶" + Item1.ToString() + "¶" + Item2.ToString() + "¶" + Ability1.ToString() + "¶" + Ability2.ToString() + "¶" + Ability3.ToString() + "¶" + DexEntry + "¶" + Levels + Moves); }
private string InstallApp(string XMLDefFile) { StringBuilder myHTML = new StringBuilder(); bool xmlOK = true; string sql, dbr = null, errorMsg = null; string checkMark = EvoUI.HTMLImgCheckMark(IEbrowser, _PathPix); myHTML.AppendFormat("<h2>{0}</h2>", XMLDefFile.Replace("_", "")); if (!string.IsNullOrEmpty(XMLDefFile)) { XmlDocument myDOM2 = new XmlDocument(); try { myDOM2.Load(FileNameWithMask(_PathXML + string.Format("Setup\\{0}.xml", XMLDefFile))); } catch //(Exception ex) { errorMsg = "XML not found or invalid"; xmlOK = false; } if (xmlOK) { string t = ""; XmlNode aNode = myDOM2.DocumentElement; if (aNode.Name == "applicationcomponent") { sql = aNode["xml"].InnerText; if (sql.StartsWith("<?xml")) { sql = xQuery.XMLHeader + sql; } aNode = aNode["sql"]; if (aNode.Attributes[xAttribute.dbTable] != null) { t = aNode.Attributes[xAttribute.dbTable].Value; myHTML.AppendFormat("<p>DB Table: {0}</p>", t); } dicoXML2DB(sql, _SqlConnectionDico); myHTML.Append("<div class=\"indent1\">"); if (string.IsNullOrEmpty(errorMsg)) { myHTML.Append(checkMark).Append("Metadata<br>"); } if (aNode.Attributes[xAttribute.dbTable] != null) { string tc = EvoDB.GetDataScalar(EvoDB.BuildSQL("count(*)", t), _SqlConnection, ref ErrorMsg); if (EvoTC.isInteger(tc)) { errorMsg = "Database table not created because it already exists."; } else { sql = aNode["create"].InnerText; dbr = EvoDB.RunSQL(sql, _SqlConnection, false); if (string.IsNullOrEmpty(dbr)) { myHTML.Append(checkMark).Append("Database structure<br>"); } else { errorMsg = dbr; } } if (string.IsNullOrEmpty(dbr)) { int i = EvoTC.String2Int(tc); if (i == 0) { sql = aNode["seed"].InnerText; dbr = EvoDB.RunSQL(sql, _SqlConnection, false); if (string.IsNullOrEmpty(dbr)) { myHTML.Append(checkMark).Append("Seed data<br>"); sql = aNode["sample"].InnerText; dbr = EvoDB.RunSQL(sql, _SqlConnection, false); if (string.IsNullOrEmpty(dbr)) { myHTML.Append(checkMark).Append("Sample data<br>"); } else { errorMsg = dbr; } } } } else { errorMsg = dbr; } } myHTML.Append("</div>"); } } if (!string.IsNullOrEmpty(errorMsg)) { myHTML.Append(EvoUI.HTMLMessage(errorMsg, EvoUI.MsgType.Error)); } } myHTML.Append(HTMLToolsLink(FormID.ToString(), "")).Append("</p>"); return(myHTML.ToString()); }
/// <summary> /// 绑定报表名称 /// </summary> public virtual void BindReport(DevComponents.DotNetBar.ComboBoxItem p_DrpID) { if (FormID != 0) { string sql = "SELECT ReportName,ID FROM dbo.Data_ReportManage where WinListID = " + FormID.ToString() + " ORDER BY Seq"; DataTable dt = SysUtils.Fill(sql); FCommon.LoadDropDNBarComb(p_DrpID, dt, "ID", "ReportName", true); if (dt.Rows.Count > 0) { p_DrpID.SelectedIndex = 1; } } }