Exemplo n.º 1
0
 public static SqlParameter[] ToParameterArray(this Centers center)
 {
     return(new SqlParameter[] { new SqlParameter("@Id", center.Id)
                                 , new SqlParameter("@Name", center.Name)
                                 , new SqlParameter("@StreetAddress", center.StreetAddress)
                                 , new SqlParameter("@CenterTypeValue", center.CenterTypeValue) });
 }
Exemplo n.º 2
0
        public Appointments(IDataReader reader)
        {
            this.Id             = Convert.ToInt32(reader["AppointmentID"]);
            this.CenterID       = Convert.ToInt32(reader["CenterID"]);
            this.ClientFullName = reader["ClientFullName"] as string;
            this.Date           = reader["AppointmentDate"] as DateTime?;

            this.Centers                 = new Centers();
            this.Centers.Id              = Convert.ToInt32(reader["CenterID"]);
            this.Centers.Id              = this.Centers.Id;
            this.Centers.Name            = reader["Name"] as string;
            this.Centers.StreetAddress   = reader["StreetAddress"] as string;
            this.Centers.CenterTypeValue = reader["CenterTypeValue"] as string;
        }