• 大小: 1.08MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-28
  • 语言: 其他
  • 标签: windows  form  GDI+,C#  

资源简介

windows form 窗体的GDI+使用, 根据数据库内容生成折线,树状,扇形图.

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;

namespace WindowsFormsApplication1
{
class DataAccesss
{
private string str_con = “server=.;database=student;uid=sa;pwd=123456;“;
SqlConnection con;
SqlCommand cmd;
SqlDataAdapter da;
DataSet[] DsArr = new DataSet[10] { new DataSet()new DataSet()new DataSet()new DataSet()new DataSet()new DataSet()new DataSet()new DataSet()new DataSet()new DataSet()};
public DataTable Show(string sqlint count) 
{
DataTable dt = new DataTable();
try
{
if (sql == null) return dt;
con = new SqlConnection(str_con);
da = new SqlDataAdapter(sql con);
da.Fill(DsArr[count]);
dt = DsArr[count].Tables[0];
}
catch (Exception){}
return dt;
}

public bool ExecuteNonQuery(string sql) 
{
con = new SqlConnection(str_con);
con.Open();
cmd = new SqlCommand(sql con);
if (cmd.ExecuteNonQuery() != 0)
{
con.Close();
return true;
}
else
{
con.Close();
return false;
}
}
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-03-18 13:12  GDI+\
     目录           0  2017-03-18 13:12  GDI+\WindowsFormsApplication1\
     目录           0  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\
     文件        1150  2017-03-18 14:38  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\DataAccesss.cs
     文件        6167  2017-03-21 13:00  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Form1.Designer.cs
     文件       12180  2017-03-21 13:01  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs
     文件        5817  2017-03-21 13:00  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Form1.resx
     文件        2728  2017-03-21 12:42  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Form2.cs
     文件        2869  2017-03-21 12:42  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Form2.designer.cs
     文件        5817  2017-03-21 12:42  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Form2.resx
     文件         439  2017-03-21 13:01  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Program.cs
     目录           0  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Properties\
     文件        1398  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Properties\AssemblyInfo.cs
     文件        2551  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.Designer.cs
     文件        5612  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Properties\Resources.resx
     文件        1032  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.Designer.cs
     文件         249  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\Properties\Settings.settings
     文件        4053  2017-03-21 12:41  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\WindowsFormsApplication1.csproj
     目录           0  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\bin\
     目录           0  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\
     文件       21504  2017-03-21 13:02  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
     文件       38400  2017-03-21 13:02  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
     文件       11600  2017-03-21 13:02  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
     文件         490  2010-03-17 22:39  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
     目录           0  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\obj\
     目录           0  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\
     目录           0  2017-03-18 13:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\
     文件        7473  2017-03-20 21:12  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        6329  2017-03-21 13:02  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件         548  2017-03-21 13:02  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.read.1.tlog
     文件        1302  2017-03-21 13:02  GDI+\WindowsFormsApplication1\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.write.1.tlog
............此处省略12个文件信息

评论

共有 条评论