Пример #1
0
 private Boolean ShowSpecialOrderList(string FactoryPO, string Category, SpecialOrderStatus SpecialOrderStatus, DateTime StartTime, DateTime EndTime)
 {
     try
     {
         IList<SpecialOrderInfo> dataList = new List<SpecialOrderInfo>();
         if (FactoryPO != "")
         {
             dataList = iSpecialOrder.GetSpecialOrderByPO(FactoryPO);
         }
         else
         {
             dataList = iSpecialOrder.GetSpecialOrder(Category, SpecialOrderStatus, StartTime, EndTime);
         }
         if (dataList == null || dataList.Count == 0)
         {
             bindTable(null, DEFAULT_ROWS);
         }
         else
         {
             bindTable(dataList, DEFAULT_ROWS);
         }
     }
     catch (FisException ex)
     {
         bindTable(null, DEFAULT_ROWS);
         showErrorMessage(ex.mErrmsg);
         return false;
     }
     catch (Exception ex)
     {
         bindTable(null, DEFAULT_ROWS);
         showErrorMessage(ex.Message);
         return false;
     }
     setColumnWidth();
     return true;
 }
Пример #2
0
 protected void btnQuery_ServerClick(Object sender, EventArgs e)
 {
     try
     {
         string FactoryPO = this.txtFactoryPOTOP.Value.Trim();
         string Category = this.dCategoryTOP.Value.Trim();
         string Status = this.dStatusTOP.Value.Trim();
         DateTime StartTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 00:00:00"));
         DateTime EndTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd 23:59:59"));
         SpecialOrderStatus SpecialOrderStatus = new SpecialOrderStatus();
         if (FactoryPO == "")
         {
             switch(Status){
                 case "Created":
                     SpecialOrderStatus = SpecialOrderStatus.Created;
                     break;
                 case "Active":
                     SpecialOrderStatus = SpecialOrderStatus.Active;
                     break;
                 case "Closed":
                     SpecialOrderStatus = SpecialOrderStatus.Closed;
                     break;
             }
             if (this.dStartTime.Value.Trim() != "" && this.dEndTime.Value.Trim() != "")
             {
                 StartTime = Convert.ToDateTime(this.dStartTime.Value.Trim());
                 EndTime = Convert.ToDateTime(this.dEndTime.Value.Trim() + " 23:59:59");
             }
         }
         ShowSpecialOrderList(FactoryPO,Category, SpecialOrderStatus, StartTime, EndTime);
     }
     catch (FisException ex)
     {
         showErrorMessage(ex.mErrmsg);
         return;
     }
     catch (Exception ex)
     {
         showErrorMessage(ex.Message);
         return;
     }
     this.updatePanel1.Update();
     ScriptManager.RegisterStartupScript(this.updatePanelAll, typeof(System.Object), "Query", "DealHideWait();", true);
 }
Пример #3
0
 /// <summary>
 /// 查詢記錄
 /// </summary>
 /// <returns></returns>
 public IList<SpecialOrderInfo> GetSpecialOrder(string category, SpecialOrderStatus status, DateTime startTime, DateTime endTime)
 {
     try
     {
         IList<SpecialOrderInfo> list = DeliveryRepository.GetSpecialOrder(category, status, startTime, endTime);
         return list;
     }
     catch (Exception)
     {
         throw;
     }
 }