• 连接打卡


    namespace Clock.IDAL
    {
    using Clock.Model;


    public interface IUsersClock
    {
    /// <summary>
    /// 获得所有打卡记录
    /// </summary>
    /// <returns></returns>
    List<UsersClock> GetUsersClocks();

    }
    }

    namespace Clock.Factory
    {
    using System.Configuration;
    using System.Reflection;
    public class DALFactory
    {
    private static readonly string AssemblyName = ConfigurationManager.AppSettings["ClockDAL"];
    /// <summary>
    /// 实例化DAL
    /// </summary>
    /// <param name="typeName">DAL类型名</param>
    /// <returns></returns>
    public static T CreateDAL<T>(string typeName)
    {
    return (T)Assembly.Load(AssemblyName).CreateInstance(AssemblyName + typeName);
    }
    }
    }

    namespace Clock.BLL
    {
    using Clock.DAL;
    using Clock.Model;
    using Clock.Factory;
    using Clock.IDAL;
    using System.Data.SqlClient;

    public class UsersClockBLL
    {
    IUsersClock clockDAL = null;
    public UsersClockBLL()
    {
    clockDAL = DALFactory.CreateDAL<UsersClockDAL>(".UsersClockDAL");
    }
    /// <summary>
    /// 获得所有打卡记录
    /// </summary>
    /// <returns></returns>
    public List<UsersClock> GetUsersClocks()
    {
    return clockDAL.GetUsersClocks();
    }
    }
    }

  • 相关阅读:
    牛客网 CSL的英语考试
    SDNU 1016.矩形合并
    SDNU 1412.Huffuman树(优先队列)
    HDU
    HDU
    HDU
    SDNU 1504.B.Fibonacci
    Find them, Catch them(种类并查集)
    golang中的net/rpc包
    gRPC
  • 原文地址:https://www.cnblogs.com/Tbwe/p/10001888.html
Copyright © 2020-2023  润新知