Exemple #1
0
        public TFactoryMs GetFactoryByCd(String facCd)
        {
            TFactoryMs     facVo = new TFactoryMs();
            ITFactoryMsDao td    = ComponentLocator.Instance().Resolve <ITFactoryMsDao>();

            facVo = td.getFactoryByCd(facCd);

            return(facVo);
        }
        public FactoryVo GetFactoryByCd(string FacCd)
        {
            ITFactoryMsDao dao       = ComponentLocator.Instance().Resolve <ITFactoryMsDao>();
            TFactoryMs     factoryms = dao.getFactoryByCd(FacCd);

            if (factoryms == null)
            {
                throw new ApplicationException(MessageUtils.GetMessage("E0001"));
            }
            else
            {
                FactoryVo factoryvo = new FactoryVo();
                PropertiesCopier.CopyProperties(factoryms, factoryvo);
                return(factoryvo);
            }
        }
Exemple #3
0
        public DataSet GetFactoryDataSet(string companyCd, string facCd, string facNm)
        {
            ITFactoryMsDao     d    = ComponentLocator.Instance().Resolve <ITFactoryMsDao>();
            IList <TFactoryMs> list = d.getAllFactoryByCdNm(companyCd, facCd, facNm);

            if (list.Count == 0)
            {
                list.Add(new TFactoryMs());
            }
            DataTable dt = DataTableUtils.ToDataTable(list);

            dt.TableName = "CCodeRefFactory";
            DataSet ds = new DataSet();

            ds.Tables.Add(dt);
            return(ds);
        }
Exemple #4
0
        /// <summary>
        /// 根据工厂代码,检查数据表中是否存在
        /// <param name="facCd">工厂代码</param>
        /// <returns>TFactoryMs</returns>
        /// </summary>
        public TFactoryMs Check01Vo(String facCd)
        {
            TFactoryMs vo = new TFactoryMs();

            try
            {
                if (!String.IsNullOrEmpty(facCd))
                {
                    ITFactoryMsDao d = ComponentLocator.Instance().Resolve <ITFactoryMsDao>();
                    vo = d.getFactoryByCd(facCd);
                }
            }
            catch (Exception ex)
            {
                throw new ApplicationException(ex.Message, ex);
            }

            return(vo);
        }