Exemple #1
0
 public DataCollectionResponse <ReturnCash> GetByAll(long shopId, string popOrderId, string type, string accountInfo,
                                                     int timeType, DateTime startTime, DateTime endTime, ReturnCashState state, int pageIndex, int pageSize)
 {
     System.Collections.Generic.Dictionary <string, object> para =
         new System.Collections.Generic.Dictionary <string, object>();
     para["shopId"]      = shopId;
     para["popOrderId"]  = popOrderId;
     para["type"]        = type;
     para["accountInfo"] = accountInfo;
     para["timeType"]    = timeType;
     para["startTime"]   = startTime;
     para["endTime"]     = endTime;
     para["state"]       = state;
     para["pageIndex"]   = pageIndex;
     para["pageSize"]    = pageSize;
     return(DoPost <DataCollectionResponse <ReturnCash> >(para));
 }
        private void Process(string serialNumber, string rcComment, ReturnCashState state)
        {
            try
            {
                this.ReturnCash.SerialNumber    = serialNumber;
                this.ReturnCash.Comment         = rcComment;
                this.ReturnCash.State           = state;
                this.ReturnCash.ProcessTime     = DateTime.Now;
                this.ReturnCash.ProcessOperator = OperatorService.LoginOperator.Number;
                this.ReturnCash.Image           = new byte[0];
                ServiceContainer.GetService <ReturnCashService>().Update(this.ReturnCash);

                var or = ServiceContainer.GetService <OrderService>().GetById(this.ReturnCash.OrderId);
                if (or == null)
                {
                    throw new Exception("原始订单已在不存在");
                }

                var    flag    = or.PopFlag == ColorFlag.None ? ColorFlag.RED : or.PopFlag;
                string comment = "";
                if (state == ReturnCashState.PROCESS_FAIL)
                {
                    comment = or.PopSellerComment + "返现失败【" + OperatorService.LoginOperator.Number + rcComment + "】";
                }
                else
                {
                    comment = or.PopSellerComment + "返现成功【" + OperatorService.LoginOperator.Number + "】";
                }
                ServiceContainer.GetService <OrderService>().ModifyPopSellerComment(or.Id, flag, comment);
                this.DialogResult = true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Exemple #3
0
 public DataCollectionResponse <ReturnCash> GetByAll(long shopId, string popOrderId, string type, string accountInfo, int timeType, DateTime startTime, DateTime endTime, ReturnCashState state, int pageIndex, int pageSize)
 {
     try
     {
         return(this.dao.GetByAll(shopId, popOrderId, type, accountInfo, timeType, startTime, endTime, state, pageIndex, pageSize));
     }
     catch (Exception ex)
     {
         throw new WebFaultException <ResponseBase>(new ResponseBase(ex.Message), System.Net.HttpStatusCode.OK);
     }
 }
Exemple #4
0
        public DataCollectionResponse <ReturnCash> GetByAll(long shopId, string popOrderId, string type, string accountInfo, int timeType, DateTime startTime, DateTime endTime, ReturnCashState state, int pageIndex, int pageSize)
        {
            string        hsql = "from " + this.GetEntiyName() + " where ";
            List <object> objs = new List <object>();

            hsql += this.MakeQuery("ShopId", shopId);
            hsql += this.MakeQuery("PopOrderId", popOrderId, objs);
            hsql += this.MakeQuery("AccountInfo", accountInfo, objs);
            hsql += this.MakeQuery("Type", type, objs);
            hsql += this.MakeQuery(TIME_TYPES[timeType], startTime, true);
            hsql += this.MakeQuery(TIME_TYPES[timeType], endTime, false);
            hsql += this.MakeQuery("State", (int)state, (int)ReturnCashState.NONE);
            return(this.GetPage(hsql, pageIndex, pageSize, objs.ToArray()));
        }