• 大小: 259KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-06-04
  • 语言: C#
  • 标签: C#  

资源简介

初学C#开发的一个非常简单的管理系统

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace ProjectManagement
{
    
    public partial class Form1 : Form
    {
        public const int MAX = 20;
        public static string list = @“list.dat“;
        public static string admin = @“admin.dat“;
        public static string other = @“other.dat“;
        public static string s_role;
        public static string s_user;
        public static string s_key;
        public static string s_name;
        public static string s_birth;
        public static string s_join;
        public static string s_info;
        public static string s;

        public Form1()
        {
            InitializeComponent();
        }

        public static void updateList(string o string n)
        {
            string stemp;
            string[] ss = new string[MAX];
            int i = 0;
            int j;
            StreamReader sr = File.OpenText(list);
            while ((stemp = sr.ReadLine()) != null)
            {
                ss[i] = stemp;
                if (ss[i] == o)
                {
                    ss[i] = n;
                }
                i++;
            }
            sr.Close();
            StreamWriter sw = File.CreateText(Form1.list);
            for (j = 0; j < i; j++) 
            {
                sw.WriteLine(ss[j]);
            }
            sw.Close();
        }

        

        private void button1_Click(object sender EventArgs e)
        {
            MessageBox.Show(“作者:魏超\n36060106“
                            “关于“
                            MessageBoxButtons.OK
                            MessageBoxIcon.Information);
        }

        private void cancel_Click(object sender EventArgs e)
        {
            Application.Exit();
        }

        private void login_Click(object sender EventArgs e)
        {
            using (StreamReader sr = File.OpenText(list))
            {
                s = sr.ReadLine();
                if (user.Text == s)
                {
                    using (StreamReader sr1 = File.OpenText(admin))
                    {
                        s_role = sr1.ReadLine();
                        s_user = sr1.ReadLine();
                        s_key = sr1.ReadLine();
                    }
                }
                else
                {
                    while ((s = sr.ReadLine()) != null)
                    {
                        if (s == user.Text) 
                        {
                            using (StreamReader sr2 = File.OpenText(other))
                            {
                                s_role = sr2.ReadLine();
                                s_user = sr2.ReadLine();
                                s_key = sr2.ReadLine();
                                s_

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

     文件         74  2008-04-20 00:01  ProjectManagement\ProjectManagement\app.config

     文件         25  2008-04-21 16:56  ProjectManagement\ProjectManagement\bin\Debug\admin.dat

     文件          8  2008-04-22 18:22  ProjectManagement\ProjectManagement\bin\Debug\list.dat

     文件         64  2008-04-22 18:22  ProjectManagement\ProjectManagement\bin\Debug\other.dat

     文件       1519  2008-04-21 17:22  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.application

     文件      40960  2008-04-21 17:22  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.exe

     文件         74  2008-04-20 00:01  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.exe.config

     文件       3098  2008-04-21 17:22  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.exe.manifest

     文件      52736  2008-04-21 17:22  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.pdb

     文件       5256  2008-04-20 00:02  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.publish\ProjectManagement.application

     文件         74  2008-04-20 00:01  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.publish\ProjectManagement_1_0_0_0\ProjectManagement.exe.config.deploy

     文件      32768  2008-04-20 00:02  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.publish\ProjectManagement_1_0_0_0\ProjectManagement.exe.deploy

     文件       6773  2008-04-20 00:02  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.publish\ProjectManagement_1_0_0_0\ProjectManagement.exe.manifest

     文件      10134  2008-04-19 23:50  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.publish\ProjectManagement_1_0_0_0\Visual Studio Add-in.ico.deploy

     文件     423872  2008-04-20 00:02  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.publish\setup.exe

     文件       1519  2008-04-21 17:22  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.vshost.application

     文件       5632  2005-12-08 14:51  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.vshost.exe

     文件         74  2008-04-20 00:01  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.vshost.exe.config

     文件       3098  2008-04-21 17:22  ProjectManagement\ProjectManagement\bin\Debug\ProjectManagement.vshost.exe.manifest

     文件       4240  2008-04-21 17:17  ProjectManagement\ProjectManagement\Form1.cs

     文件       8267  2008-04-20 15:13  ProjectManagement\ProjectManagement\Form1.Designer.cs

     文件       5814  2008-04-20 15:13  ProjectManagement\ProjectManagement\Form1.resx

     文件       6091  2008-04-21 17:22  ProjectManagement\ProjectManagement\Form2.cs

     文件      12745  2008-04-21 16:08  ProjectManagement\ProjectManagement\Form2.Designer.cs

     文件       5814  2008-04-21 16:08  ProjectManagement\ProjectManagement\Form2.resx

     文件       1958  2008-04-21 17:07  ProjectManagement\ProjectManagement\Form3.cs

     文件       4632  2008-04-20 21:22  ProjectManagement\ProjectManagement\Form3.Designer.cs

     文件       5814  2008-04-20 21:22  ProjectManagement\ProjectManagement\Form3.resx

     文件       1519  2008-04-21 17:22  ProjectManagement\ProjectManagement\obj\Debug\ProjectManagement.application

     文件        958  2008-04-21 16:08  ProjectManagement\ProjectManagement\obj\Debug\ProjectManagement.csproj.GenerateResource.Cache

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

评论

共有 条评论