public Target_Facture Get_Facture_Service_Kinds() { Target_Facture target_Facture = new Target_Facture(); dao = new DAO(DBConnection.enConnectionType.SourceConnectionString); cmd = new SqlCommand(); cmd.CommandText = "SELECT DISTINCT FACTURE_SERVICE_KIND_IN FROM [FACTURE] "; SqlDataReader sqlDataReader = dao.ExeDataReader(cmd); while (sqlDataReader.Read()) { Int32 KIND; KIND = sqlDataReader.GetInt32(sqlDataReader.GetOrdinal("FACTURE_SERVICE_KIND_IN")); if (KIND == 0) { target_Facture.HasSeat = true; } if (KIND == 1) { target_Facture.HasToGo = true; } if (KIND == 2) { target_Facture.HasDelivery = true; } } return(target_Facture); }
private void Fill_Facture_Service_Kinds(DAL.Source.Target_Facture target_Facture) { chkHasDelivery.Checked = target_Facture.HasDelivery; chkHasToGo.Checked = target_Facture.HasToGo; chkHasSeat.Checked = target_Facture.HasSeat; }