public List <Contractor> GetsByContractorType(EnumContractorType oContractorType, int nContractor)
        {
            Connection.Open();
            Command.CommandText = ContractorDA.GetsByContractorType(oContractorType, nContractor);

            SqlDataReader     reader        = Command.ExecuteReader();
            Contractor        _oContractor  = new Contractor();
            List <Contractor> _oContractors = new List <Contractor>();

            if (reader.HasRows)
            {
                _oContractors = MakeObjects(reader);
            }
            reader.Close();
            Connection.Close();
            return(_oContractors);
        }
Beispiel #2
0
 public static string GetsByContractorType(EnumContractorType nContractorType, int nContractor)
 {
     return("SELECT * FROM View_Contractor WHERE ContractorType = " + (int)nContractorType);
 }