Esempio n. 1
0
        private static void Fill(DiffAnalyse entity, IDataReader dr)
        {
            if (dr == null)
            {
                return;
            }

            entity.PartCode        = Convert.IsDBNull(dr["PartCode"]) ? string.Empty : dr["PartCode"].ToString();
            entity.PartChineseName = Convert.IsDBNull(dr["PartChineseName"]) ? string.Empty : dr["PartChineseName"].ToString();
            entity.PartPlantCode   = Convert.IsDBNull(dr["PartPlantCode"]) ? string.Empty : dr["PartPlantCode"].ToString();
            entity.Workshops       = Convert.IsDBNull(dr["Workshops"]) ? string.Empty : dr["Workshops"].ToString();
            entity.Segments        = Convert.IsDBNull(dr["Segments"]) ? string.Empty : dr["Segments"].ToString();
            entity.RequestUser     = Convert.IsDBNull(dr["RequestUser"]) ? string.Empty : dr["RequestUser"].ToString();
            entity.TypeName        = Convert.IsDBNull(dr["TypeName"]) ? string.Empty : dr["TypeName"].ToString();
            entity.RepairAmount    = Convert.IsDBNull(dr["RepairAmount"]) ? string.Empty : dr["RepairAmount"].ToString();
            entity.CSMTAmount      = Convert.IsDBNull(dr["CSMTAmount"]) ? string.Empty : dr["CSMTAmount"].ToString();
            entity.RDCAmount       = Convert.IsDBNull(dr["RDCAmount"]) ? string.Empty : dr["RDCAmount"].ToString();
            entity.SGMAmount       = Convert.IsDBNull(dr["SGMAmount"]) ? string.Empty : dr["SGMAmount"].ToString();
            entity.Price           = Convert.IsDBNull(dr["Price"]) ? string.Empty : dr["Price"].ToString();
            entity.LevelName       = Convert.IsDBNull(dr["LevelName"]) ? string.Empty : dr["LevelName"].ToString();
            entity.PlanDate        = Convert.IsDBNull(dr["PlanDate"]) ? string.Empty : dr["PlanDate"].ToString();
            entity.WorkLocation    = Convert.IsDBNull(dr["WorkLocation"]) ? string.Empty : dr["WorkLocation"].ToString();
            entity.CategoryName    = Convert.IsDBNull(dr["CategoryName"]) ? string.Empty : dr["CategoryName"].ToString();
            entity.HOLD            = Convert.IsDBNull(dr["HOLD"]) ? string.Empty : dr["HOLD"].ToString();
            entity.SysHOLD         = Convert.IsDBNull(dr["SysHOLD"]) ? string.Empty : dr["SysHOLD"].ToString();
            entity.UnRecorded      = Convert.IsDBNull(dr["UnRecorded"]) ? string.Empty : dr["UnRecorded"].ToString();
            entity.Wip             = Convert.IsDBNull(dr["Wip"]) ? string.Empty : dr["Wip"].ToString();
            entity.M080            = Convert.IsDBNull(dr["M080"]) ? string.Empty : dr["M080"].ToString();
            entity.Sys_Block_CSMT  = Convert.IsDBNull(dr["Sys_Block_CSMT"]) ? string.Empty : dr["Sys_Block_CSMT"].ToString();
            entity.Specs           = Convert.IsDBNull(dr["Specs"]) ? string.Empty : dr["Specs"].ToString();
            entity.SupplierName    = Convert.IsDBNull(dr["SupplierName"]) ? string.Empty : dr["SupplierName"].ToString();
        }
Esempio n. 2
0
 private static void Fill(List <DiffAnalyse> list, IDataReader dr)
 {
     while (dr.Read())
     {
         DiffAnalyse entity = new DiffAnalyse();
         Fill(entity, dr);
         list.Add(entity);
     }
 }