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

资源简介

自己写的,课程设计。

资源截图

代码片段和文件信息

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

namespace StudentManageSystem
{
    public class Course
    {
        public string coursename;
        public string teacher;
        public int credit;
        public int hours;
        public Course(string nstring tint cint h)
        {
            coursename = n;
            teacher = t;
            credit = c;
            hours = h;
        }
        public static Course getCourse(string name)
        {
            Course s = null;
            string sql = “select * from course_tb where coursename=‘“+name+“‘“;
            DataTable dt = DbHelper.getDataset(sql).Tables[0];
            if(dt.Rows.Count>0)
                s = new Course(dt.Rows[0][0].ToString() dt.Rows[0][1].ToString() Convert.ToInt32(dt.Rows[0][2].ToString()) Convert.ToInt32(dt.Rows[0][3].ToString()));
            return s;
        }
        public static bool AddCourse(Course st)
        {
            string sql = “insert into course_tb values (‘“ + st.coursename + “‘‘“+st.teacher+“‘‘“+st.credit+“‘‘“+st.hours+“‘)“;
            if (DbHelper.ExecuteSql(sql) > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public static bool DeleteCourse(Course st)
        {
            string sql = “delete from course_tb where coursename=‘“ + st.coursename + “‘“;
            if (DbHelper.ExecuteSql(sql) > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
        public static bool UpdateCourse(Course st)
        {
            string sql = “update course_tb set coursename=‘“ + st.coursename + “‘teacher=‘“+st.teacher+“‘credit=‘“+st.credit+“‘hours=‘“+st.hours+“‘ where coursename=‘“ + st.coursename + “‘“;
            if (DbHelper.ExecuteSql(sql) > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}

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

     文件    1659392  2016-12-28 23:05  StudentManageSystem\StudentInfo_Db.bak

     文件      48640  2016-12-28 23:03  StudentManageSystem\StudentManageSystem\bin\Debug\StudentManageSystem.exe

     文件     101888  2016-12-28 23:03  StudentManageSystem\StudentManageSystem\bin\Debug\StudentManageSystem.pdb

     文件      11600  2016-12-28 23:03  StudentManageSystem\StudentManageSystem\bin\Debug\StudentManageSystem.vshost.exe

     文件       2220  2016-12-28 16:59  StudentManageSystem\StudentManageSystem\Course.cs

     文件       1538  2016-12-28 11:25  StudentManageSystem\StudentManageSystem\DbHelper.cs

     文件       2097  2016-12-28 22:34  StudentManageSystem\StudentManageSystem\Grade.cs

     文件        921  2016-12-28 23:03  StudentManageSystem\StudentManageSystem\Login.cs

     文件       5392  2016-12-28 10:52  StudentManageSystem\StudentManageSystem\Login.Designer.cs

     文件       5817  2016-12-28 10:50  StudentManageSystem\StudentManageSystem\Login.resx

     文件      17486  2016-12-28 22:56  StudentManageSystem\StudentManageSystem\Main.cs

     文件      54879  2016-12-28 22:50  StudentManageSystem\StudentManageSystem\Main.Designer.cs

     文件      14603  2016-12-28 22:50  StudentManageSystem\StudentManageSystem\Main.resx

     文件       1768  2016-12-28 17:18  StudentManageSystem\StudentManageSystem\Major.cs

     文件       2855  2016-12-28 10:17  StudentManageSystem\StudentManageSystem\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

     文件       6292  2016-12-28 23:03  StudentManageSystem\StudentManageSystem\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件       1225  2016-12-28 23:03  StudentManageSystem\StudentManageSystem\obj\x86\Debug\StudentManageSystem.csproj.FileListAbsolute.txt

     文件       1285  2016-12-28 22:59  StudentManageSystem\StudentManageSystem\obj\x86\Debug\StudentManageSystem.csproj.GenerateResource.Cache

     文件      48640  2016-12-28 23:03  StudentManageSystem\StudentManageSystem\obj\x86\Debug\StudentManageSystem.exe

     文件        180  2016-12-28 22:59  StudentManageSystem\StudentManageSystem\obj\x86\Debug\StudentManageSystem.Login.resources

     文件        180  2016-12-28 22:59  StudentManageSystem\StudentManageSystem\obj\x86\Debug\StudentManageSystem.Main.resources

     文件     101888  2016-12-28 23:03  StudentManageSystem\StudentManageSystem\obj\x86\Debug\StudentManageSystem.pdb

     文件        180  2016-12-28 22:59  StudentManageSystem\StudentManageSystem\obj\x86\Debug\StudentManageSystem.Properties.Resources.resources

     文件        180  2016-12-28 22:59  StudentManageSystem\StudentManageSystem\obj\x86\Debug\StudentManageSystem.UpdateCourse.resources

     文件        180  2016-12-28 22:59  StudentManageSystem\StudentManageSystem\obj\x86\Debug\StudentManageSystem.UpdateGrade.resources

     文件        180  2016-12-28 22:59  StudentManageSystem\StudentManageSystem\obj\x86\Debug\StudentManageSystem.UpdateStudent.resources

     文件        500  2016-12-28 10:52  StudentManageSystem\StudentManageSystem\Program.cs

     文件       1370  2016-12-28 10:16  StudentManageSystem\StudentManageSystem\Properties\AssemblyInfo.cs

     文件       2890  2016-12-28 10:16  StudentManageSystem\StudentManageSystem\Properties\Resources.Designer.cs

     文件       5612  2016-12-28 10:16  StudentManageSystem\StudentManageSystem\Properties\Resources.resx

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

评论

共有 条评论