Beispiel #1
0
        public IList<PVFItem> GetPVFByCompanyID(int companyId)
        {
            IList<PVFItem> result = new List<PVFItem>();

            Query query = new Query("PeakValleyFlat");
            query.AddCriterion("CompanyID", companyId, SqlServerDataAdapter.Infrastruction.CriteriaOperator.Equal);
            DataTable dt = dataFactory.Query(query);

            foreach (DataRow row in dt.Rows)
            {
                PVFItem item = new PVFItem();
                item.ID = int.Parse(row["ID"].ToString());
                item.GroupID = int.Parse(row["GroupID"].ToString());
                item.CompanyID = int.Parse(row["CompanyID"].ToString());
                item.EndTime = row["EndTime"].ToString().Trim();
                item.StartTime = row["StartTime"].ToString().Trim();
                item.Flag = (bool)row["Flag"];
                item.Type = int.Parse(row["Type"].ToString());
                result.Add(item);
            }

            return result;
        }
Beispiel #2
0
        public IList <PVFItem> GetPVFByCompanyID(int companyId)
        {
            IList <PVFItem> result = new List <PVFItem>();

            Query query = new Query("PeakValleyFlat");

            query.AddCriterion("CompanyID", companyId, SqlServerDataAdapter.Infrastruction.CriteriaOperator.Equal);
            DataTable dt = dataFactory.Query(query);

            foreach (DataRow row in dt.Rows)
            {
                PVFItem item = new PVFItem();
                item.ID        = int.Parse(row["ID"].ToString());
                item.GroupID   = int.Parse(row["GroupID"].ToString());
                item.CompanyID = int.Parse(row["CompanyID"].ToString());
                item.EndTime   = row["EndTime"].ToString().Trim();
                item.StartTime = row["StartTime"].ToString().Trim();
                item.Flag      = (bool)row["Flag"];
                item.Type      = int.Parse(row["Type"].ToString());
                result.Add(item);
            }

            return(result);
        }