示例#1
0
        private DischesWayRef GetDischesWayRef(int dishesId, int DishesWayId)
        {
            DischesWayRef dr = new DischesWayRef()
            {
                DishId         = dishesId,
                DischesWayId   = DishesWayId,
                CreateBy       = SubjectUtils.GetAuthenticationId(),
                CreateDatetime = DateTime.Now
            };

            return(dr);
        }
 public DischesWayRefModel CreateDischesWayRefModel(DischesWayRef bean)
 {
     this.Id             = bean.Id;
     this.DishId         = bean.DishId;
     this.DischesWayId   = bean.DischesWayId;
     this.Price          = bean.Price;
     this.CreateDatetime = bean.CreateDatetime;
     this.CreateBy       = bean.CreateBy;
     this.Deleted        = bean.Deleted;
     this.Status         = bean.Status;
     this.UpdateDatetime = bean.UpdateDatetime;
     this.UpdateBy       = bean.UpdateBy;
     this.Name           = bean.DischesWay.Name;
     return(this);
 }
        public DischesWayRef CreateDischesWayRef(DischesWayRefModel bean)
        {
            DischesWayRef beanBack = new DischesWayRef();

            beanBack.Id             = bean.Id;
            beanBack.DishId         = bean.DishId;
            beanBack.DischesWayId   = bean.DischesWayId;
            beanBack.Price          = bean.Price;
            beanBack.CreateDatetime = bean.CreateDatetime;
            beanBack.CreateBy       = bean.CreateBy;
            beanBack.Deleted        = bean.Deleted;
            beanBack.Status         = bean.Status;
            beanBack.UpdateDatetime = bean.UpdateDatetime;
            beanBack.UpdateBy       = bean.UpdateBy;
            return(beanBack);
        }