Example #1
0
 /// <summary>
 /// 根据ID获取关联单位(客户/供应商)
 /// </summary>
 /// <param name="id">ID</param>
 /// <returns></returns>
 public Company RetrieveCompany(int id)
 {
     using (IDbConnection conn = DAOFactory.Instance.OpenConnection())
     {
         ICompanyDAO dao = DAOFactory.Instance.CreateCompanyDAO();
         return(dao.SelectCompany(id, conn));
     }
 }
Example #2
0
 public Company GetCompanyByCode(string code)
 {
     using (IDbConnection conn = DAOFactory.Instance.OpenConnection())
     {
         ICompanyDAO dao = DAOFactory.Instance.CreateCompanyDAO();
         return(dao.SelectCompany(code, conn));
     }
 }