Exemplo n.º 1
0
 //订单的状态在草稿、文件已上传、订单已委托 三个状态发生时记录到订单状态变更日志
 public static void add_list_time(int status, string ordercode, JObject json_user)
 {
     int[] status_array = new int[] { 1, 10, 15 };
     foreach (int status_tmp in status_array)
     {
         if (status >= status_tmp)
         {
             OrderEn entTimes = new OrderEn();
             entTimes.Status         = status_tmp;
             entTimes.Code           = ordercode;
             entTimes.CreateUserId   = json_user.Value <Int32>("ID");
             entTimes.CreateUserName = json_user.Value <string>("REALNAME");
             CreateOrderPre creaTimes = new CreateOrderPre();
             creaTimes.CreateOrdertimes(entTimes);
         }
     }
 }
Exemplo n.º 2
0
        public static void add_cspond(string busiunitcode, string busitype, string ordercode, string associateno, string correspondno, JObject json_user) //订单提交完成后需要同时新增一条预配信息
        {
            string    sql       = "select * from list_cspond where ordercode='" + ordercode + "'";
            DataTable dt_cspond = DBMgr.GetDataTable(sql);

            //2016-6-27 新增判断 因为发现一个漏洞,一个订单产生了两个预配信息
            //比如订单保存后,打开两个编辑页,分别进行提交,就会产生两个预配信息 故先到数据库判断一下有没有,再进行插入操作
            if (dt_cspond.Rows.Count == 0)
            {
                OrderEn entOrder = new OrderEn();
                entOrder.BusiType     = busitype;
                entOrder.BusiUnitCode = busiunitcode;
                entOrder.CustomerCode = json_user.Value <string>("CUSTOMERCODE");
                entOrder.Status       = 15;
                entOrder.Priority     = 0;
                entOrder.CorrespondNo = correspondno;
                entOrder.AssociateNo  = associateno;
                entOrder.Code         = ordercode;
                CreateOrderPre creaOrder = new CreateOrderPre();
                creaOrder.CreateOrderPreMatch(entOrder);
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="OrderSpecification{T}"/> class.
 /// </summary>
 /// <param name="direction">
 /// The direction.
 /// </param>
 protected OrderSpecification(OrderEn direction)
 {
     this.Order = direction;
 }