Ejemplo n.º 1
0
        /// <summary>
        /// 获取订单信息
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        public OrderInfo GetOrderInfo(string orderId)
        {
            OrdersService.OrdersService service = new OrdersService.OrdersService();
            DataTable dt = service.GetOrderModel(orderId);

            OrderInfo model = new OrderInfo();

            model.OrderId = orderId;
            if (dt.Rows.Count > 0)
            {
                model.UserId = dt.Rows[0]["UserId"].ToString();
                if (dt.Rows[0]["CreateDate"].ToString() != "")
                {
                    model.CreateDate = DateTime.Parse(dt.Rows[0]["CreateDate"].ToString());
                }
                model.Operator = dt.Rows[0]["Operator"].ToString();
                if (dt.Rows[0]["State"].ToString() != "")
                {
                    model.State = int.Parse(dt.Rows[0]["State"].ToString());
                }
                model.Remark    = dt.Rows[0]["Remark"].ToString();
                model.Address   = dt.Rows[0]["Address"].ToString();
                model.Contactor = dt.Rows[0]["Contactor"].ToString();
                model.Tel       = dt.Rows[0]["Tel"].ToString();
                model.Email     = dt.Rows[0]["Email"].ToString();
                return(model);
            }
            return(null);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获取订单信息
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        public OrderInfo GetOrderInfo(string orderId)
        {
            OrdersService.OrdersService service = new OrdersService.OrdersService();
            DataTable dt = service.GetOrderModel(orderId);

            OrderInfo model = new OrderInfo();
            model.OrderId = orderId;
            if (dt.Rows.Count > 0)
            {
                model.UserId = dt.Rows[0]["UserId"].ToString();
                if (dt.Rows[0]["CreateDate"].ToString() != "")
                {

                    model.CreateDate = DateTime.Parse(dt.Rows[0]["CreateDate"].ToString());
                }
                model.Operator = dt.Rows[0]["Operator"].ToString();
                if (dt.Rows[0]["State"].ToString() != "")
                {
                    model.State = int.Parse(dt.Rows[0]["State"].ToString());
                }
                model.Remark = dt.Rows[0]["Remark"].ToString();
                model.Address = dt.Rows[0]["Address"].ToString();
                model.Contactor = dt.Rows[0]["Contactor"].ToString();
                model.Tel = dt.Rows[0]["Tel"].ToString();
                model.Email = dt.Rows[0]["Email"].ToString();
                return model;
            }
            return null;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 删除订单信息
 /// </summary>
 /// <param name="orderId"></param>
 /// <returns></returns>
 public int DeleteOrders(string orderId)
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     int result = service.DeleteOrders(orderId);
     if (result > 0)
     {
         GiftBiz biz = new GiftBiz();
         DataTable dt = GetOrders_DetailList(-1, orderId, string.Empty, string.Empty);
         foreach (DataRow row in dt.Rows)
         {
             GiftInfo model = biz.GetModel(row["giftid"].ToString());
             int count = int.Parse(row["giftcount"].ToString());
             model.Quantity += count;
             result *= biz.UpdateGift(model);
         }
     }
     return result;
 }
Ejemplo n.º 4
0
        /// <summary>
        /// 删除订单信息
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        public int DeleteOrders(string orderId)
        {
            OrdersService.OrdersService service = new OrdersService.OrdersService();
            int result = service.DeleteOrders(orderId);

            if (result > 0)
            {
                GiftBiz   biz = new GiftBiz();
                DataTable dt  = GetOrders_DetailList(-1, orderId, string.Empty, string.Empty);
                foreach (DataRow row in dt.Rows)
                {
                    GiftInfo model = biz.GetModel(row["giftid"].ToString());
                    int      count = int.Parse(row["giftcount"].ToString());
                    model.Quantity += count;
                    result         *= biz.UpdateGift(model);
                }
            }
            return(result);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 获取订单明细
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Orders_DetailInfo GetOrders_DetailModel(int id)
        {
            OrdersService.OrdersService service = new OrdersService.OrdersService();
            DataTable dt = service.GetOrders_DetailModel(id);

            Orders_DetailInfo model = new Orders_DetailInfo();

            model.Id = id;
            if (dt.Rows.Count > 0)
            {
                model.OrderId = dt.Rows[0]["OrderId"].ToString();
                model.GiftId  = dt.Rows[0]["GiftId"].ToString();
                if (dt.Rows[0]["GiftCount"].ToString() != "")
                {
                    model.GiftCount = int.Parse(dt.Rows[0]["GiftCount"].ToString());
                }
                model.Usage  = dt.Rows[0]["Usage"].ToString();
                model.Remark = dt.Rows[0]["Remark"].ToString();
                return(model);
            }
            return(null);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// 更新订单信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int UpdateOrders(OrderInfo model)
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return(service.UpdateOrders(model.OrderId, model.UserId, model.Operator, model.State, model.Remark, model.Address, model.Contactor, model.Tel, model.Email));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 获取订单明细列表
 /// </summary>
 /// <param name="id"></param>
 /// <param name="orderId"></param>
 /// <param name="giftId"></param>
 /// <param name="usage"></param>
 /// <returns></returns>
 public DataTable GetOrders_DetailList(int id, string orderId, string giftId, string usage)
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return(service.GetOrders_DetailList(id, orderId, giftId, usage));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// 删除订单明细
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public int DeleteOrders_Detail(int id)
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return(service.DeleteOrders_Detail(id));
 }
Ejemplo n.º 9
0
 /// <summary>
 /// 更新订单明细信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int UpdateOrders_Detail(Orders_DetailInfo model)
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return(service.UpdateOrders_Detail(model.Id, model.OrderId, model.GiftId, model.GiftCount, model.Usage, model.Remark));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// 获取新的订单id
 /// </summary>
 /// <returns></returns>
 public string GetNewOrderId()
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return(service.GetNewOrderId());
 }
Ejemplo n.º 11
0
 /// <summary>
 /// 获取新的订单id
 /// </summary>
 /// <returns></returns>
 public string GetNewOrderId()
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return service.GetNewOrderId();
 }
Ejemplo n.º 12
0
 /// <summary>
 /// 更新订单信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int UpdateOrders(OrderInfo model)
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return service.UpdateOrders(model.OrderId, model.UserId, model.Operator, model.State, model.Remark,model.Address,model.Contactor,model.Tel,model.Email);
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 获取订单明细列表
 /// </summary>
 /// <param name="id"></param>
 /// <param name="orderId"></param>
 /// <param name="giftId"></param>
 /// <param name="usage"></param>
 /// <returns></returns>
 public DataTable GetOrders_DetailList(int id, string orderId, string giftId, string usage)
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return service.GetOrders_DetailList(id, orderId, giftId, usage);
 }
Ejemplo n.º 14
0
        /// <summary>
        /// 获取订单明细
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Orders_DetailInfo GetOrders_DetailModel(int id)
        {
            OrdersService.OrdersService service = new OrdersService.OrdersService();
            DataTable dt = service.GetOrders_DetailModel(id);

            Orders_DetailInfo model = new Orders_DetailInfo();
            model.Id = id;
            if (dt.Rows.Count > 0)
            {
                model.OrderId = dt.Rows[0]["OrderId"].ToString();
                model.GiftId = dt.Rows[0]["GiftId"].ToString();
                if (dt.Rows[0]["GiftCount"].ToString() != "")
                {
                    model.GiftCount = int.Parse(dt.Rows[0]["GiftCount"].ToString());
                }
                model.Usage = dt.Rows[0]["Usage"].ToString();
                model.Remark = dt.Rows[0]["Remark"].ToString();
                return model;
            }
            return null;
        }
Ejemplo n.º 15
0
 /// <summary>
 /// 删除订单明细
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public int DeleteOrders_Detail(int id)
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return service.DeleteOrders_Detail(id);
 }
Ejemplo n.º 16
0
 /// <summary>
 /// 更新订单明细信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int UpdateOrders_Detail(Orders_DetailInfo model)
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return service.UpdateOrders_Detail(model.Id, model.OrderId, model.GiftId, model.GiftCount, model.Usage, model.Remark);
 }
Ejemplo n.º 17
0
 /// <summary>
 /// 获取订单列表
 /// </summary>
 /// <param name="orderId"></param>
 /// <param name="userId"></param>
 /// <param name="startDate"></param>
 /// <param name="endDate"></param>
 /// <param name="operatorId"></param>
 /// <param name="state"></param>
 /// <returns></returns>
 public DataTable GetOrdersList(string orderId, string userId, string startDate, string endDate, string operatorId, int state)
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return(service.GetOrdersList(orderId, userId, startDate, endDate, operatorId, state));
 }
Ejemplo n.º 18
0
 /// <summary>
 /// 获取订单列表
 /// </summary>
 /// <param name="orderId"></param>
 /// <param name="userId"></param>
 /// <param name="startDate"></param>
 /// <param name="endDate"></param>
 /// <param name="operatorId"></param>
 /// <param name="state"></param>
 /// <returns></returns>
 public DataTable GetOrdersList(string orderId, string userId, string startDate, string endDate, string operatorId, int state)
 {
     OrdersService.OrdersService service = new OrdersService.OrdersService();
     return service.GetOrdersList(orderId, userId, startDate, endDate, operatorId, state);
 }