• 大小: 72KB
    文件类型: .rar
    金币: 2
    下载: 0 次
    发布日期: 2021-05-13
  • 语言: C#
  • 标签: Mysql  C#  登录注册  

资源简介

基于Mysql数据库的C#实现简单的登录注册功能

资源截图

代码片段和文件信息

/*
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Excel = Microsoft.Office.Interop.Excel;

namespace test01
{
    class Account
    {
        public int ID { get; set; }
        public double Balance { get; set; }
        static void DisplayInExcel(IEnumerable accounts)
        {
            var excelApp = new Excel.Application();
            // Make the object visible.
            excelApp.Visible = true;
            // Create a new empty workbook and add it to the collection returned
            // by property Workbooks. The new workbook becomes the active workbook.
            // Add has an optional parameter for specifying a praticular template.
            // Because no argument is sent in this example Add creates a new workbook.
            excelApp.Workbooks.Add();
            // This example uses a single workSheet. The explicit type casting is
            // removed in a later procedure.
            Excel._Worksheet workSheet = (Excel.Worksheet)excelApp.ActiveSheet;
            workSheet.Cells[1 “A“] = “ID Number“;
            workSheet.Cells[1 “B“] = “Current Balance“;
            var row = 1;
            foreach (var acct in accounts)
            {
                row++;
                workSheet.Cells[row “A“] = acct.ID;
                workSheet.Cells[row “B“] = acct.Balance;
            }
            workSheet.Columns[1].AutoFit();
            workSheet.Columns[2].AutoFit();
        }
    }
}


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Excel = Microsoft.Office.Interop.Excel;
namespace test01
{
    public class Account
    {
        public int ID { get; set; }
        public double Balance { get; set; }
    }
    class Program
    {
        static void DisplayInExcel(IEnumerable accounts)
        {
            var excelApp = new Excel.Application();
            // Make the object visible.
            excelApp.Visible = true;
            // Create a new empty workbook and add it to the collection returned
            // by property Workbooks. The new workbook becomes the active workbook.
            // Add has an optional parameter for specifying a praticular template.
            // Because no argument is sent in this example Add creates a new workbook.
            excelApp.Workbooks.Add();
            // This example uses a single workSheet. The explicit type casting is
            // removed in a later procedure.
            Excel._Worksheet workSheet = (Excel.Worksheet)excelApp.ActiveSheet;
            workSheet.Cells[1 “A“] = “ID Number“;
            workSheet.Cells[1 “B“] = “Current Balance“;
            var row = 1;
            foreach (var acct in accounts)
            {
                row++;
                workSheet.Cells[row “A“] = acct.ID;
                workSheet.Cells[row “B“] = acct.Balance;
            }
            w

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       4561  2017-07-03 14:48  test01\test01\Account.cs

     文件        385  2017-07-04 15:32  test01\test01\app.config

     文件       9014  2017-07-03 16:20  test01\test01\bin\Debug\Book1.xlsx

     文件      14848  2017-07-05 10:44  test01\test01\bin\Debug\test01.exe

     文件        385  2017-07-04 15:32  test01\test01\bin\Debug\test01.exe.config

     文件      34304  2017-07-05 10:44  test01\test01\bin\Debug\test01.pdb

     文件      11592  2017-07-05 10:55  test01\test01\bin\Debug\test01.vshost.exe

     文件        385  2017-07-04 15:32  test01\test01\bin\Debug\test01.vshost.exe.config

     文件        490  2015-07-10 19:01  test01\test01\bin\Debug\test01.vshost.exe.manifest

    ..A.SH.       165  2017-07-04 10:35  test01\test01\bin\Debug\~$Book1.xlsx

     文件       5249  2017-07-05 10:44  test01\test01\Form1.cs

     文件       6916  2017-07-05 10:26  test01\test01\Form1.Designer.cs

     文件       5817  2017-07-04 21:40  test01\test01\Form1.resx

     文件       2458  2017-07-05 10:36  test01\test01\Form2.cs

     文件       5648  2017-07-05 09:37  test01\test01\Form2.Designer.cs

     文件       5817  2017-07-05 09:37  test01\test01\Form2.resx

     文件       5420  2017-07-04 15:03  test01\test01\obj\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6700  2017-07-05 10:44  test01\test01\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        647  2017-07-05 10:55  test01\test01\obj\Debug\test01.csproj.FileListAbsolute.txt

     文件       1033  2017-07-05 10:02  test01\test01\obj\Debug\test01.csproj.GenerateResource.Cache

     文件      34390  2017-07-05 10:02  test01\test01\obj\Debug\test01.csprojResolveAssemblyReference.cache

     文件      14848  2017-07-05 10:44  test01\test01\obj\Debug\test01.exe

     文件        180  2017-07-05 10:02  test01\test01\obj\Debug\test01.Form1.resources

     文件        180  2017-07-05 10:02  test01\test01\obj\Debug\test01.Form2.resources

     文件      34304  2017-07-05 10:44  test01\test01\obj\Debug\test01.pdb

     文件        180  2017-07-05 10:02  test01\test01\obj\Debug\test01.Properties.Resources.resources

     文件       5420  2017-07-03 14:29  test01\test01\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6418  2017-07-04 14:56  test01\test01\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        947  2017-07-04 15:02  test01\test01\obj\x86\Debug\test01.csproj.FileListAbsolute.txt

     文件        975  2017-07-04 15:02  test01\test01\obj\x86\Debug\test01.csproj.GenerateResource.Cache

............此处省略27个文件信息

评论

共有 条评论