/// <summary>
 /// 初始化数据
 /// </summary>
 public void InitializeData()
 {
     using (SqlCRUD sqlCRUD = new SqlCRUD(SqlHelper.MyConnectionString))
     {
         OrdersData = sqlCRUD.SelectData("Orders", new string[] { "ID", "Money", "Time" },"DATEDIFF(day, Time, '"+DateTime.Now.ToShortDateString()+"')<="+this.FilterDay.ToString());
     }
     OrderSelectIndex = 0;
 }
 /// <summary>
 /// Button(提交按钮)相关Command
 /// </summary>
 /// <param name="obj"></param>
 public void PostOrdersProc(object obj)
 {
     string info = string.Empty;
     if (String.IsNullOrEmpty(this.Remark))
     {
         info = OrderList.GetOrderInfoString();
     }
     else
     {
         info = OrderList.GetOrderInfoString() + "\n\n备注信息:\n" + this.Remark;
     }
     if (ModernDialog.ShowMessage(info, "订单信息", MessageBoxButton.OKCancel) ==
         MessageBoxResult.OK)
     {
         SqlHelper sqlH=null;
         try
         {
             using (sqlH = new SqlHelper(SqlHelper.MyConnectionString))
             {
                 SqlCRUD sqlCRUD = new SqlCRUD(SqlHelper.MyConnectionString);
                 sqlCRUD.InsertData("Orders", new string[] { "Info", "Money", "Time" },
                     new string[] { info, OrderList.TotalMoney.ToString(), DateTime.Now.ToString() });
             }
             this.Remark = string.Empty;
             OrdersInfoPageViewModel OrdersInfoVM = ViewModelsManager.GetViewModelFromResources<OrdersInfoPageViewModel>();
             OrdersInfoVM.InitializeData();
         }
         finally
         {
             if (sqlH != null)
             {
                 sqlH.Dispose();
             }
         }
     }   
 }