Esempio n. 1
0
 public void InitConstruction(DataTable dt)
 {
     qcConstructionList = new QcconstructiondtlModelList();
     if (dt.Rows.Count == 0)
     {
         return;
     }
     for (int i = 0; i < dt.Rows.Count; i++)
     {
         QcconstructiondtlModel cm = new QcconstructiondtlModel();
         cm.Construction = dt.Rows[i]["Construction"].ToString();
         qcConstructionList.Add(cm);
     }
 }
Esempio n. 2
0
        public QcconstructiondtlModelList GetModelListOne(QcconstructiondtlModel model)
        {
            QcconstructiondtlTable  table  = new QcconstructiondtlTable();
            PbknitconstructionTable table1 = new PbknitconstructionTable();
            SelectSqlSection        sql    = DataAccess.DefaultDB.Select(table1, table1.Description).Join(table, table1.Construction == table.Construction);

            if (model.QualityCode != "")
            {
                sql.Where(table.QualityCode == model.QualityCode);
            }
            using (SafeDataReader sdr = new SafeDataReader(sql.ToDataReader()))
            {
                QcconstructiondtlModelList result = new QcconstructiondtlModelList();
                while (sdr.Read())
                {
                    QcconstructiondtlModel m = new QcconstructiondtlModel();
                    m.Construction = sdr.GetString(table1.Description);
                    result.Add(m);
                }
                return(result);
            }
        }
Esempio n. 3
0
        public QcconstructiondtlModelList GetModelList(QcconstructiondtlModel model)
        {
            QcconstructiondtlTable table = new QcconstructiondtlTable();
            SelectSqlSection       sql   = DataAccess.DefaultDB.Select(table, table.AllColumns());

            if (model.QualityCode != "")
            {
                sql.Where(table.QualityCode == model.QualityCode);
            }
            using (SafeDataReader sdr = new SafeDataReader(sql.ToDataReader()))
            {
                QcconstructiondtlModelList result = new QcconstructiondtlModelList();
                while (sdr.Read())
                {
                    QcconstructiondtlModel m = new QcconstructiondtlModel();
                    m.Iden         = sdr.GetInt32(table.Iden);
                    m.QualityCode  = sdr.GetString(table.QualityCode);
                    m.Construction = sdr.GetString(table.Construction);
                    result.Add(m);
                }
                return(result);
            }
        }