Beispiel #1
0
        public IList <Store> GetDrugList(string keyWord)
        {
            //以下代码将以默认的数据访问访问。
            DataEntityQuery <Store> query = DataEntityQuery <Store> .Create();

            var p = (from item in query
                     where (keyWord == string.Empty || item.InputCode1.StartsWith(keyWord) || item.ChinseName.StartsWith(keyWord))
                     orderby item.ChinseName ascending
                     select item);

            var x = p.ToList();

            ////以下代码将会以自宝定义访问
            //IDataAccessor da = EAS.Objects.ContainerBuilder.BuilderDefault().GetComponentInstance("DataAccessor2") as IDataAccessor;
            ////以下代码将会以自宝定义访问
            //IOrmAccessor oa = EAS.Objects.ContainerBuilder.BuilderDefault().GetComponentInstance("IOrmAccessor2") as IOrmAccessor;

            //DataEntityQuery<Store> query2 = DataEntityQuery<Store>.Create();
            //query2.OrmAccessor = oa;
            //query2.DataAccessor = da;
            //var p2 = (from item in query2
            //          where item.InputCode1.StartsWith(keyWord)
            //          orderby item.ChinseName ascending
            //          select item);

            //x = p2.ToList();

            return(x);
        }
Beispiel #2
0
        public int findDocments(String parentID, String docName)
        {
            DataEntityQuery <DOC_FILE_DIR> query = DataEntityQuery <DOC_FILE_DIR> .Create();

            var p = (from item in query where item.DFD_PATH_NAME == docName && item.DFD_PARENT_DIR_ID == parentID select item);

            return(p.Count());
        }
Beispiel #3
0
        public int findSonDocments(String id)
        {
            DataEntityQuery <DOC_FILE_DIR> query = DataEntityQuery <DOC_FILE_DIR> .Create();

            var p = (from item in query where item.DFD_PARENT_DIR_ID == id select item);

            return(p.Count());
        }
Beispiel #4
0
        /// <summary>
        /// 删除目录
        /// </summary>
        /// <param name="dir"></param>
        /// <returns></returns>

        /* public bool deleteDocumentDir(DOC_FILE_DIR dir)
         * {
         *   try
         *   {
         *        dir.Delete();
         *        return true;
         *   }
         *   catch (Exception)
         *   {
         *       return false;
         *
         *   }
         * }*/
        /// <summary>
        /// 根据文件节点id查询相应记录
        /// </summary>
        /// <param name="dfd_id"></param>
        /// <returns></returns>
        public DOC_FILE_DIR findDoc(String dfd_id)
        {
            DataEntityQuery <DOC_FILE_DIR> query = DataEntityQuery <DOC_FILE_DIR> .Create();

            var p = (from item in query where item.DFD_ID == dfd_id select item);

            return(p.FirstOrDefault());
        }
Beispiel #5
0
        public IList <WF_APP_USER> GetWFAppStepUser(string wfappID, string wftStepID)
        {
            DataEntityQuery <WF_APP_USER> query = DataEntityQuery <WF_APP_USER> .Create();

            IWFTemplatesStepService _wfService = ServiceContainer.GetService <WFTemplatesStepService>();
            IList <WF_APP_USER>     list       = _wfService.GetWFAppStepUser(wfappID, wftStepID);

            return(list);
        }
        public void GetDataList(string equipname)
        {
            DataEntityQuery <EquipTypeSlet> query = DataEntityQuery <EquipTypeSlet> .Create();

            var v = (from item in query
                     where    (equipname.Trim().Length == 0 || item.EquipName == equipname)
                     select item);

            this.vList = v as IQueryable <EquipTypeSlet>;
        }
Beispiel #7
0
        public IList <WF_DETAIL> GetWfDetailList(string wfaID)
        {
            DataEntityQuery <WF_DETAIL> query = DataEntityQuery <WF_DETAIL> .Create();

            var p = (from item in query
                     where (item.DEL_FLAG == "N" && item.WFA_ID == wfaID)
                     select item
                     );

            return(p.ToList());
        }
Beispiel #8
0
        public IList <WF_APP_USER> GetAllUserList(string wfaID)
        {
            DataEntityQuery <WF_APP_USER> query = DataEntityQuery <WF_APP_USER> .Create();

            var p = (from item in query
                     where (item.WFA_ID == wfaID && item.DEL_FLAG == "N")
                     select item
                     );

            return(p.ToList());
        }
Beispiel #9
0
        public IList <WF_APP_USER> GetWFAppStepUser(string wfappID, string wftStepID)
        {
            DataEntityQuery <WF_APP_USER> query = DataEntityQuery <WF_APP_USER> .Create();

            var p = (from item in query
                     where (item.DEL_FLAG == "N" && item.WFA_ID == wfappID && item.WFT_STEP_ID == wftStepID)
                     select item
                     );

            return(p.ToList());
        }
Beispiel #10
0
        public IList <PDM_PRODUCT_STRUCT> getListByPartsID(String productID, String partsID)
        {
            DataEntityQuery <PDM_PRODUCT_STRUCT> query = DataEntityQuery <PDM_PRODUCT_STRUCT> .Create();

            var p = (from item in query
                     where (item.PRODUCTID == productID) && (item.PARTSID == partsID)
                     select item
                     );

            return(p.ToList());
        }
Beispiel #11
0
        public IList <PDM_PRODUCT_DOCUMENT> getProDocByProID(String proID)
        {
            DataEntityQuery <PDM_PRODUCT_DOCUMENT> query = DataEntityQuery <PDM_PRODUCT_DOCUMENT> .Create();

            var p = (from item in query
                     where (item.PRODUCTID == proID)
                     select item
                     );

            return(p.ToList());
        }
Beispiel #12
0
        //public int GetMaxID()
        //{
        //    return new MaxCodeService().GetMaxCode(new PDM_DOCUMENT().DbTableName);
        //}

        public IList <PDM_DOCUMENT> GetDocumentListForList()
        {
            DataEntityQuery <PDM_DOCUMENT> query = DataEntityQuery <PDM_DOCUMENT> .Create();

            var p = (from item in query
                     orderby item.CREATEDATE ascending
                     select item
                     );

            return(p.ToList());
        }
Beispiel #13
0
        /// <summary>
        /// 获取树形目录结构
        /// </summary>
        /// <returns></returns>
        public List <MYWOKSPACE> GetByParentId(string p_parentId)
        {
            DataEntityQuery <MYWOKSPACE> query = DataEntityQuery <MYWOKSPACE> .Create();

            var p = (from item in query
                     where (item.PARENTID == p_parentId)
                     select item
                     );

            return(p.ToList());
        }
Beispiel #14
0
        public IList <Dict> GetDrugDictList(string keyWord)
        {
            DataEntityQuery <Dict> query = DataEntityQuery <Dict> .Create();

            var p = (from item in query
                     where (keyWord == string.Empty || item.InputCode1.ToUpper().StartsWith(keyWord) || item.ChinseName.ToUpper().StartsWith(keyWord))
                     orderby item.ChinseName ascending
                     select item);

            return(p.ToList());
        }
Beispiel #15
0
        /// <summary>
        /// 获取产品私有过滤器或者公共过滤器
        /// </summary>
        /// <param name="productID"></param>
        /// <returns></returns>
        public IList <PDM_FILTER> getFilterList(String productID, String isProduct)
        {
            DataEntityQuery <PDM_FILTER> query = DataEntityQuery <PDM_FILTER> .Create();

            var p = (from item in query
                     where ((item.OWNERSHIP == "PUBLIC") || (item.PRODUCTID == productID) && (item.ISPRODUCT == isProduct))
                     select item
                     );

            return(p.ToList());
        }
Beispiel #16
0
        public IList <PDM_PRODUCT_STRUCT> getProStructListByID(String proStructID)
        {
            DataEntityQuery <PDM_PRODUCT_STRUCT> query = DataEntityQuery <PDM_PRODUCT_STRUCT> .Create();

            var p = (from item in query
                     where (item.ID == proStructID)
                     select item
                     );

            return(p.ToList());
        }
Beispiel #17
0
        public IList <Provider> GetProviderList()
        {
            DataEntityQuery <Provider> query = DataEntityQuery <Provider> .Create();

            var p = (from item in query
                     orderby item.Name ascending
                     select item
                     );

            return(p.ToList());
        }
        public Inventory GetDrugStoreCountList(DateTime EventTime)
        {
            DataEntityQuery <Inventory> query = DataEntityQuery <Inventory> .Create();

            var p = (from item in query
                     where  item.EventTime == EventTime
                     orderby item.ChinseName ascending
                     select item);

            return(p.ToList().Count > 0 ? p.ToList()[0] : null);
        }
Beispiel #19
0
        public IList <PDM_PARTS_DOCUMENT> GetPartsDocByDocID(string docID)
        {
            DataEntityQuery <PDM_PARTS_DOCUMENT> query = DataEntityQuery <PDM_PARTS_DOCUMENT> .Create();

            var p = (from item in query
                     where (item.DOCID == docID)
                     select item
                     );

            return(p.ToList());
        }
Beispiel #20
0
        public ComboBoxValue GetComboBoxItemByComboID(string comboID)
        {
            DataEntityQuery <ComboBoxValue> query = DataEntityQuery <ComboBoxValue> .Create();

            var p = (from item in query
                     where item.COMBID == comboID
                     select item
                     );

            return(p.ToList()[0]);
        }
Beispiel #21
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            DataEntityQuery <Leave> query = DataEntityQuery <Leave> .Create();

            var v = from c in query
                    where c.Name.StartsWith(this.tbName.Text)
                    select c;

            this.vList = v as IQueryable <Leave>;
            this.dataPager.RecordCount = this.vList.Count();
        }
        public IList <DrugType> GetDrugTypeList()
        {
            DataEntityQuery <DrugType> query = DataEntityQuery <DrugType> .Create();

            var p = (from item in query
                     orderby item.Name ascending
                     select item
                     );

            return(p.ToList());
        }
        public IList <PDM_PRODUCT_PRORECORD> GetProductList()
        {
            DataEntityQuery <PDM_PRODUCT_PRORECORD> query = DataEntityQuery <PDM_PRODUCT_PRORECORD> .Create();

            var p = (from item in query
                     orderby item.PRORECORDID ascending
                     select item
                     );

            return(p.ToList());
        }
Beispiel #24
0
        /// <summary>
        /// 根据产品/半成品ID获取产品结构
        /// </summary>
        /// <param name="productID"></param>
        /// <returns></returns>
        public IList <PDM_PRODUCT_STRUCT> GetProStructList(String productID, String isProduct)
        {
            DataEntityQuery <PDM_PRODUCT_STRUCT> query = DataEntityQuery <PDM_PRODUCT_STRUCT> .Create();

            var p = (from item in query
                     where ((item.PRODUCTID == productID) && (item.ISPRODUCT == isProduct))
                     orderby item.SORTCODE ascending
                     select item
                     );

            return(p.ToList());
        }
Beispiel #25
0
        public IList <WF_TEMPLATES_STEP> GetWFStepListByWFID(string wftID)
        {
            DataEntityQuery <WF_TEMPLATES_STEP> query = DataEntityQuery <WF_TEMPLATES_STEP> .Create();

            var p = (from item in query
                     orderby item.CREATEDATE ascending
                     where (item.DEL_FLAG == "N" && item.WFT_ID == wftID)
                     select item
                     );

            return(p.ToList());
        }
Beispiel #26
0
        public IList <WF_APP_HANDLE> GetWfAppHandleList(string wfaID)
        {
            DataEntityQuery <WF_APP_HANDLE> query = DataEntityQuery <WF_APP_HANDLE> .Create();

            var p = (from item in query
                     orderby item.COMPLEMENTDATE descending
                     where (item.WFA_ID == wfaID && (item.IS_THROUGH == "Y" || item.IS_THROUGH == "N") && item.OBJECTTYPE == "SingleUser")
                     select item
                     );

            return(p.ToList());
        }
Beispiel #27
0
        public IList <Store> GetDrugList(string keyWord, bool isZero)
        {
            DataEntityQuery <Store> query = DataEntityQuery <Store> .Create();

            var p = (from item in query
                     where (keyWord == string.Empty || item.InputCode1.StartsWith(keyWord)) &&
                     (isZero == false || item.Number == 0)
                     orderby item.ChinseName ascending
                     select item);

            return(p.ToList());
        }
Beispiel #28
0
        public IList <WF_APP_HANDLE> GetAllHandleList(string wfaID)
        {
            DataEntityQuery <WF_APP_HANDLE> query = DataEntityQuery <WF_APP_HANDLE> .Create();

            var p = (from item in query
                     orderby item.LASTUPDATEDATE descending
                     where (item.WFA_ID == wfaID && item.DEL_FLAG == "N")
                     select item
                     );

            return(p.ToList());
        }
Beispiel #29
0
        public List <SOut> GetDrugOutList(string customName, string keyWord)
        {
            DataEntityQuery <SOut> query = DataEntityQuery <SOut> .Create();

            var p = (from item in query
                     where (customName == string.Empty || item.CustomName == customName || (item.CustomName.StartsWith(customName))) &&
                     (keyWord == string.Empty || (item.InputCode1.StartsWith(keyWord)))
                     orderby item.EventTime descending
                     select item);

            return(p.ToList());
        }
Beispiel #30
0
        public IList <Provider> GetProviderList(string keys)
        {
            DataEntityQuery <Provider> query = DataEntityQuery <Provider> .Create();

            var p = (from item in query
                     where (keys == string.Empty || item.Name.Contains(keys) || item.InputCode.Contains(keys))
                     orderby item.Name ascending
                     select item
                     );

            return(p.ToList());
        }