• 大小: 42.35MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-24
  • 语言: C#
  • 标签: 源代码  C#  WPF  

资源简介

通过学习传智播客教程,改写的人事管理系统,主要是对界面进行了 完善的,是一份较好的学习C#程序的资源

资源截图

代码片段和文件信息

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

namespace HSMS.DAL
{
  public  class DepartmentDAL
    {
      private static Department ToModel(DataRow row)
      {
          Department department = new Department();
          department.Id = (Guid)row[“Id“];
          department.Name = (string)row[“Name“];
          return department;
      }

      public static IEnumerable ListALL()
      {
          DataTable dt = SqlHelper.ExecuteDataTable(“select * from T_Department where IsStopped=0“);
          List list = new List();
          foreach (DataRow row in dt.Rows)
          {
              list.Add(ToModel(row));
          }
          return list;
      }
      public static Department GetById(Guid id)
      {
          DataTable dt = SqlHelper.ExecuteDataTable(“select * from T_Department where Id=@Id“
                            new SqlParameter(“@Id“ id));
          if (dt.Rows.Count <= 0)
          {
              return null;
          }
          else
          {
              Department department = ToModel(dt.Rows[0]);
              return department;
          }
         
      }

//      public static void Insert(Department department)
//      {
//          SqlHelper.ExcuteNonQuery(@“insert into T_Department(IdNameIsStopped) 
//                                    values(@Id@Name0)“
//                                                       new SqlParameter(“@Id“ department.Id)
//                                                       new SqlParameter(“@Name“ department.Name));
      
      public static void Insert(string name)
      {
          SqlHelper.ExcuteNonQuery(@“insert into T_Department(IdNameIsStopped)
                                             values(newid()@Name0)“
                                                                     new SqlParameter(“@Name“ name));
      }
      //public static void Update(Department department)
      //{
      //    SqlHelper.ExcuteNonQuery(“Update T_Department set Id=@IdName=@NameIsStopped=@IsStopped“
      //                                      new SqlParameter(“@Id“ department.Id)
      //                                      new SqlParameter(“@Name“ department.Name)
      //                                      new SqlParameter(“@IsStopped“ department.IsStopped));
      //}

      public static void Update(Guid id string name)
      {
          SqlHelper.ExcuteNonQuery(@“Update T_Department Set Name=@Name where Id=@Id“
              new SqlParameter(“@Name“ name) new SqlParameter(“@Id“ id));
      }
      public static void Delete(Department department)
      {
          SqlHelper.ExcuteNonQuery(“update T_Department set IsStopped=1 where Id=@Id“
                                    new SqlParameter(“@Id“department

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

     文件      12800  2013-12-14 10:11  HSMS.Model\bin\Debug\HSMS.Model.dll

     文件       7680  2013-12-14 10:11  HSMS.Model\bin\Debug\HSMS.Model.pdb

     文件        292  2013-05-11 23:16  HSMS.Model\Department.cs

     文件       4348  2013-05-11 23:16  HSMS.Model\Employee.cs

     文件       2560  2013-05-16 20:31  HSMS.Model\HSMS.Model.csproj

     文件        242  2013-05-11 23:16  HSMS.Model\IdName.cs

     文件       5625  2013-12-14 10:11  HSMS.Model\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        381  2013-12-12 20:12  HSMS.Model\obj\Debug\HSMS.Model.csproj.FileListAbsolute.txt

     文件      12800  2013-12-14 10:11  HSMS.Model\obj\Debug\HSMS.Model.dll

     文件       7680  2013-12-14 10:11  HSMS.Model\obj\Debug\HSMS.Model.pdb

     文件        421  2013-05-07 20:55  HSMS.Model\Operator.cs

     文件       1372  2013-05-06 16:18  HSMS.Model\Properties\AssemblyInfo.cs

     文件        317  2013-05-16 20:31  HSMS.Model\SalarySheet.cs

     文件        463  2013-05-16 20:31  HSMS.Model\SalarySheetItem.cs

     文件        378  2013-05-15 09:06  HSMS.Model\T_OperationLog.cs

     文件        356  2013-11-10 23:37  HSMS.UI\App.config

     文件        386  2013-11-29 15:34  HSMS.UI\App.xaml

     文件        601  2013-05-15 23:12  HSMS.UI\App.xaml.cs

     文件     252196  2013-12-12 09:03  HSMS.UI\backgroundImage\he.jpg

     文件    4191351  2013-12-11 10:55  HSMS.UI\backgroundImage\Login.jpg

     文件      25190  2013-12-11 11:13  HSMS.UI\backgroundImage\Login1.jpg

     文件    2613270  2013-12-11 15:26  HSMS.UI\backgroundImage\main.png

     文件    1143354  2013-12-11 15:58  HSMS.UI\backgroundImage\main1.bmp

     文件      95255  2013-12-11 16:02  HSMS.UI\backgroundImage\main2.jpg

     文件      13918  2013-12-11 11:26  HSMS.UI\backgroundImage\manage.jpg

     文件      14451  2013-12-11 11:33  HSMS.UI\backgroundImage\manage1.jpg

     文件    4885610  2013-12-11 17:19  HSMS.UI\backgroundImage\me.jpg

     文件      70338  2013-12-11 18:00  HSMS.UI\backgroundImage\ou.jpg

     文件      26624  2013-12-14 10:11  HSMS.UI\bin\Debug\HSMS.DAL.dll

     文件      46592  2013-12-14 10:11  HSMS.UI\bin\Debug\HSMS.DAL.pdb

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

评论

共有 条评论