Esempio n. 1
0
        /// <summary>
        /// 获取
        /// </summary>
        /// <returns></returns>
        public static Settled GetSettled()
        {
            Settled mSettled = new Settled();

            Mall.Entities.SettledInfo mSettledInfo = SettledApplication.GetSettled();
            if (mSettledInfo != null)
            {
                //Mapper.CreateMap<Mall.Entities.SettledInfo, Settled>();
                //  mSettled = Mapper.Map<Mall.Entities.SettledInfo, Settled>(mSettledInfo);
                mSettled = mSettledInfo.Map <Settled>();
            }
            return(mSettled);
        }
Esempio n. 2
0
        /// <summary>
        /// 设置
        /// </summary>
        /// <param name="mSettled"></param>
        public static void Settled(Settled mSettled)
        {
            //Mapper.CreateMap<Settled, Mall.Entities.SettledInfo>();
            //  var model = Mapper.Map<Settled, Mall.Entities.SettledInfo>(mSettled);
            var model = mSettled.Map <Mall.Entities.SettledInfo>();

            if (model.ID > 0)
            {
                SettledApplication.UpdateSettled(model);
            }
            else
            {
                SettledApplication.AddSettled(model);
            }
        }