Ejemplo n.º 1
0
        public async Task <ResponseViewModel <bool> > AddOrder(Order00EditViewModel orderEntity)
        {
            var data = new ResponseViewModel <bool>();

            var order = new OrderEntity
            {
                //Id =
                SHOP_ID      = orderEntity.SHOP_ID,
                ORDER_ID     = orderEntity.ORDER_ID,
                INPUT_DATE   = orderEntity.INPUT_DATE,
                ORD_USER     = orderEntity.ORD_USER,
                EXPECT_DATE  = orderEntity.EXPECT_DATE,
                STATUS       = orderEntity.STATUS,
                ORD_TYPE     = orderEntity.ORD_TYPE,
                OUT_SHOP     = orderEntity.OUT_SHOP,
                EXPORTED_ID  = orderEntity.EXPORTED_ID,
                EXPORTED     = orderEntity.EXPORTED,
                APP_USER     = orderEntity.APP_USER,
                APP_DATE     = orderEntity.APP_DATE,
                Memo         = orderEntity.Memo,
                LOCKED       = 0,
                ORD_DEP_ID   = "",
                CRT_DATETIME = DateTime.Now,
                CRT_USER_ID  = "",
                //MOD_DATETIME = null,
                MOD_USER_ID = "",
                //LAST_UPDATE = null,
                Trans_STATUS = 0
            };

            data.Data = await _orderProvider.AddOrder(order);

            return(data);
        }
Ejemplo n.º 2
0
        public async Task <ResponseViewModel <bool> > UpdateOrder(int id, Order00EditViewModel orderEntity)
        {
            var data = new ResponseViewModel <bool>();

            var order = await _orderProvider.Order(id);

            order.SHOP_ID     = orderEntity.SHOP_ID;
            order.ORDER_ID    = orderEntity.ORDER_ID;
            order.INPUT_DATE  = orderEntity.INPUT_DATE;
            order.ORD_USER    = orderEntity.ORD_USER;
            order.EXPECT_DATE = orderEntity.EXPECT_DATE;
            order.STATUS      = orderEntity.STATUS;
            order.ORD_TYPE    = orderEntity.ORD_TYPE;
            order.OUT_SHOP    = orderEntity.OUT_SHOP;
            order.EXPORTED_ID = orderEntity.EXPORTED_ID;
            order.EXPORTED    = orderEntity.EXPORTED;
            order.APP_USER    = orderEntity.APP_USER;
            order.APP_DATE    = orderEntity.APP_DATE;
            order.Memo        = orderEntity.Memo;

            data.Data = await _orderProvider.UpdateOrder(order);

            return(data);
        }