public static List <UcmlVcButton> GetVcButton(SqlConnection conn, string vcOid) { List <UcmlVcButton> buttons = new List <UcmlVcButton>(); StringBuilder sql = new StringBuilder("select "); sql.Append("Caption,IamgeLink,Width,ToolTip,OnClickSourceCode,ButtonType,fOnlyPicture "); sql.Append("from BusinessButtonDataSet "); sql.Append("where AppletOID='" + vcOid + "'"); SqlCommand cmd = new SqlCommand(sql.ToString(), conn); SqlDataReader reader = cmd.ExecuteReader(); while (reader.Read()) { UcmlVcButton button = new UcmlVcButton(); button.Caption = Util.GetPropString(reader, 0); button.ImgeLink = Util.GetPropString(reader, 1); button.Width = Util.GetProperInt(reader, 2); button.ToolTip = Util.GetPropString(reader, 3); button.OnClickScript = Util.GetPropString(reader, 4); button.Type = Util.GetProperInt(reader, 5); button.fOnlyPicture = Util.GetPropBool(reader, 6); buttons.Add(button); } reader.Close(); return(buttons); }
public static List<UcmlVcButton> GetVcButton(SqlConnection conn, string vcOid) { List<UcmlVcButton> buttons = new List<UcmlVcButton>(); StringBuilder sql = new StringBuilder("select "); sql.Append("Caption,IamgeLink,Width,ToolTip,OnClickSourceCode,ButtonType,fOnlyPicture "); sql.Append("from BusinessButtonDataSet "); sql.Append("where AppletOID='" + vcOid+"'"); SqlCommand cmd = new SqlCommand(sql.ToString(), conn); SqlDataReader reader = cmd.ExecuteReader(); while (reader.Read()) { UcmlVcButton button = new UcmlVcButton(); button.Caption = Util.GetPropString(reader, 0); button.ImgeLink = Util.GetPropString(reader, 1); button.Width = Util.GetProperInt(reader, 2); button.ToolTip = Util.GetPropString(reader, 3); button.OnClickScript = Util.GetPropString(reader, 4); button.Type = Util.GetProperInt(reader, 5); button.fOnlyPicture = Util.GetPropBool(reader, 6); buttons.Add(button); } reader.Close(); return buttons; }