예제 #1
0
        public List<MachinePrepareItem_mpit_Info> GetPrepareProjectsByProjectID(string ProjectID)
        {
            List<MachinePrepareItem_mpit_Info> returnList = null;

            try
            {
                try
                {
                    using (MainDBDataContext db = new MainDBDataContext())
                    {
                        IEnumerable<MachinePrepareItem_mpit> searchDatas = from t in db.MachinePrepareItem_mpit
                                                                           where t.mpit_lIsDeleted == false
                                                                           //orderby t.mpit_PIPFID
                                                                           select t;

                        searchDatas = searchDatas.Where(w => w.mpit_PIPFID.ToString().ToUpper().Trim().Equals(ProjectID.Trim().ToUpper()));

                        Master.MachineMasterDA machineDA = new DAL.SqlDAL.HBPMS.Master.MachineMasterDA();
                        PrepareProjectMasterDA PPDA = new PrepareProjectMasterDA();

                        if (searchDatas != null && searchDatas.Count() > 0)
                        {
                            returnList = new List<MachinePrepareItem_mpit_Info>();

                            foreach (MachinePrepareItem_mpit item in searchDatas)
                            {
                                MachinePrepareItem_mpit_Info info = Common.General.CopyObjectValue<MachinePrepareItem_mpit, MachinePrepareItem_mpit_Info>(item);

                                info.MachineItem = machineDA.GetMachineItem(info.mpit_cDCMPID.Trim());
                                info.PrepareProjectItem = PPDA.GetPPItems(info.mpit_PIPFID);
                                info.ppmSeq = info.PrepareProjectItem.ppm_iSeq;

                                returnList.Add(info);
                            }
                        }
                    }
                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }
            catch (Exception Ex)
            {

                throw Ex;
            }

            return returnList;
        }
예제 #2
0
        public List<MachinePrepareItem_mpit_Info> SearchRecords(Model.IModel.IModelObject searchCondition)
        {
            List<MachinePrepareItem_mpit_Info> returnList = null;

            if (searchCondition != null)
            {
                MachinePrepareItem_mpit_Info query = searchCondition as MachinePrepareItem_mpit_Info;

                try
                {
                    try
                    {
                        using (MainDBDataContext db = new MainDBDataContext())
                        {
                            IEnumerable<MachinePrepareItem_mpit > searchDatas = from t in db.MachinePrepareItem_mpit
                                                                         where t.mpit_lIsDeleted==false
                                                                         orderby t.mpit_PIPFID
                                                                         select t;

                            Master.MachineMasterDA machineDA = new DAL.SqlDAL.HBPMS.Master.MachineMasterDA();
                            PrepareProjectMasterDA PPDA = new PrepareProjectMasterDA();

                            if (searchDatas != null && searchDatas.Count() > 0)
                            {
                                returnList = new List<MachinePrepareItem_mpit_Info>();

                                foreach (MachinePrepareItem_mpit item in searchDatas)
                                {
                                    MachinePrepareItem_mpit_Info info = Common.General.CopyObjectValue<MachinePrepareItem_mpit , MachinePrepareItem_mpit_Info>(item);

                                    info.MachineItem = machineDA.GetMachineItem(info.mpit_cDCMPID.Trim());
                                    info.PrepareProjectItem = PPDA.GetPPItems(info.mpit_PIPFID);
                                    info.ppmSeq = info.PrepareProjectItem.ppm_iSeq;

                                    returnList.Add(info);
                                }
                            }
                        }
                    }
                    catch (Exception Ex)
                    {

                        throw Ex;
                    }
                }
                catch (Exception Ex)
                {

                    throw Ex;
                }
            }

            return returnList;
        }
예제 #3
0
 public PrepareProjectMasterBL()
 {
     this._prepareProjectMasterDA = new PrepareProjectMasterDA();
 }