遗忘海岸

江湖程序员 -Feiph(LM战士)

导航

共用数据库访问上下文

    public partial class CheckScanService : WCFServiceBase<JL_MFGEntities>, ICheckScanService
    {
        private I_Craft_CardService CarSrv = null;
        public CheckScanService()
        {
            CarSrv = new I_Craft_CardService();
            CarSrv.SetCtx(this.Ctx);
        }
        protected override JL_MFGEntities GetCtx()
        {
            return com.geelyhd.MFG.EFModel.DBCtx.GetCtx();
        }
        public com.geelyhd.MFG.EFModel.TerDishInfo GetTerDishInfo(string lblNo)
        {

            var sapSvr = new SAPDataService();
            var response= sapSvr.GetTerDishInfo(lblNo);
            if (response.Code != 0) throw new Exception(response.Msg);
            var ent=new com.geelyhd.MFG.EFModel.TerDishInfo();
            Map<com.geelyhd.MFG.Service.SAPServer.TerDishInfo, com.geelyhd.MFG.EFModel.TerDishInfo>(response.Model, ent);
            return ent;
        }
    }
View Code

 

posted on 2016-03-29 10:17  遗忘海岸  阅读(215)  评论(0编辑  收藏  举报