示例#1
0
        public static List <Qualification> GetQualificationAllByPersonID(QualificationPersonType Type, int?ID)
        {
            List <Qualification> b   = new List <Qualification>();
            SqlConnection        con = new SqlConnection(BaseDataBase.ConnectionString);
            SqlCommand           com = new SqlCommand("sp_GetPersonQualificationAllByPersonID", con);

            com.CommandType = System.Data.CommandType.StoredProcedure;
            SqlParameter pr1 = new SqlParameter("@PersonID", ID);
            SqlParameter pr2 = new SqlParameter("@PersonType", Type);

            com.Parameters.Add(pr1);
            com.Parameters.Add(pr2);
            try
            {
                con.Open();
                SqlDataReader rd = com.ExecuteReader();
                while (rd.Read())
                {
                    b.Add(GetQualificationByID(rd.GetInt32(0)));
                }
            }
            finally
            {
                con.Close();
            }
            return(b);
        }
示例#2
0
 public Qualification(QualificationPersonType PersonType, int PersonID, string QualificationName, DateTime Date, string Image, string Notes)
 {
     this.PersonType          = PersonType;
     this.PersonID            = PersonID;
     this.QualificationName   = QualificationName;
     this.DateOfQualification = Date;
     this.QualificationImage  = Image;
     this.Notes = Notes;
 }