Beispiel #1
0
        /// <summary>
        /// 根据条件获取实体集合
        /// </summary>
        /// <param name="pc">pc</param>
        /// <param name="obc">obc</param>
        /// <returns>实体</returns>
        public List <WorkorderProcessInfoModel> RetrieveMultiple(ParameterCollection pc, OrderByCollection obc)
        {
            List <WorkorderProcessInfoModel> workorderprocessinfos = new List <WorkorderProcessInfoModel>();

            WorkorderProcessInfoModel workorderprocessinfo = new WorkorderProcessInfoModel();
            DataTable dt = DbUtil.Current.RetrieveMultiple(workorderprocessinfo, pc, obc);

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                workorderprocessinfo = new WorkorderProcessInfoModel();
                workorderprocessinfo.ConvertFrom(dt, i);
                workorderprocessinfos.Add(workorderprocessinfo);
            }

            return(workorderprocessinfos);
        }
Beispiel #2
0
        /// <summary>
        /// 根据主键获取实体
        /// </summary>
        /// <param name="processid"></param>
        /// <returns>实体</returns>
        public WorkorderProcessInfoModel Retrieve(string processid)
        {
            WorkorderProcessInfoModel workorderprocessinfo = new WorkorderProcessInfoModel();

            workorderprocessinfo.ProcessId = processid;

            DataTable dt = DbUtil.Current.Retrieve(workorderprocessinfo);

            if (dt.Rows.Count < 1)
            {
                return(null);
            }

            workorderprocessinfo.ConvertFrom(dt);

            return(workorderprocessinfo);
        }