Exemplo n.º 1
0
        public CustCatCodesVM getCustCatCodesInfoByID(string _ID)
        {
            objF01030 = new F01030Repository();

            Mapper.CreateMap<F01030, CustCatCodesVM>();

            F01030 objEntity = objF01030.GetSingle(x => x.CustomerID == _ID);

            CustCatCodesVM objResult = new CustCatCodesVM();

            objResult = Mapper.Map(objEntity, objResult);

            return objResult;
        }
Exemplo n.º 2
0
        public F01030Model GetDataByCustomerID(string customerID)
        {
            Mapper.CreateMap<F01030, F01030Model>();
            objF01030 = new F01030Repository();

            F01030 objEntity = objF01030.GetSingle(c => c.CustomerID.Equals(customerID));
            F01030Model resultModel = new F01030Model();

            resultModel = Mapper.Map(objEntity, resultModel);

            return resultModel;
        }
Exemplo n.º 3
0
        public IList<CustShippingVM> getCustShippingInfoByID(string _ID)
        {
            objF01031 = new F01031Repository();
            objF01030 = new F01030Repository();

            IList<CustShippingVM> objResult = new List<CustShippingVM>();

            IList<F01031> objEntity= objF01031.GetAll(x=>x.CustomerID.Equals(_ID)).ToList();

            foreach (F01031 item in objEntity)
            {
                CustShippingVM data = new CustShippingVM();

                data.ShipToID = item.ShipToID;
                data.DeliveryZone = item.DeliveryZone;
                data.ShipToName = objF01030.GetSingle(x => x.CustomerID.Equals(data.ShipToID)).CustomerName;

                objResult.Add(data);
            }

            return objResult;
        }