Ejemplo n.º 1
0
 private Foresight.DataAccess.Ui.DataGrid LoadRoomFeeHistoryList()
 {
     try
     {
         int        CompanyID            = 0;
         List <int> RoomIDList           = new List <int>();
         List <int> ProjectIDList        = new List <int>();
         int        FeeID                = 0;
         int        RoomFeeOrderID       = 0;
         DateTime   StartChargeTime      = DateTime.MinValue;
         DateTime   EndChargeTime        = DateTime.MinValue;
         bool       IncludIsCharged      = false;
         bool       IncludePreCharge     = false;
         bool       IncludeDepoistCharge = false;
         int        DepoistStatus        = int.MinValue;
         int        PreChargeStatus      = int.MinValue;
         long       startRowIndex        = 0;
         int        pageSize             = int.MaxValue;
         int[]      ChargeManID          = new int[] { };
         int[]      ChargeSummaryID      = new int[] { };
         int[]      ChargeTypeID         = new int[] { };
         int[]      CategoryID           = new int[] { };
         bool       IncludeFooter        = true;
         List <int> ChargeStatusIDList   = (new int[] { 1, 3, 4, 6, 7 }).ToList();
         bool       IsRoomFeeSearch      = true;
         bool       IsCuiShou            = false;
         int        ContractID           = 0;
         bool       ExcludeCuiShou       = false;
         List <int> HistoryIDList        = new List <int>();
         if (!string.IsNullOrEmpty(hdHistoryIDList.Value))
         {
             HistoryIDList = JsonConvert.DeserializeObject <List <int> >(hdHistoryIDList.Value);
         }
         Foresight.DataAccess.Ui.DataGrid dg = ViewRoomFeeHistory.GetViewRoomFeeHistoryGridByRoomID(RoomIDList, ProjectIDList, FeeID, StartChargeTime, EndChargeTime, IncludIsCharged, IncludePreCharge, IncludeDepoistCharge, DepoistStatus, PreChargeStatus, CompanyID, ChargeManID, ChargeSummaryID, ChargeTypeID, CategoryID, ChargeStatusIDList, RoomFeeOrderID, IsRoomFeeSearch, IsCuiShou, ContractID, "order by [PrintNumber] desc", startRowIndex, pageSize, HistoryIDList, ExcludeCuiShou, IncludeFooter: true, UserID: WebUtil.GetUser(this.Context).UserID);
         return(dg);
     }
     catch (Exception ex)
     {
         LogHelper.WriteError("CreateFeeOrder.aspx", "visit: LoadRoomFeeHistoryList", ex);
         return(null);
     }
 }
 private ViewRoomFeeHistory[] LoadRoomFeeHistoryList(int ContractID)
 {
     ViewRoomFeeHistory[] list = new ViewRoomFeeHistory[] { };
     try
     {
         int        CompanyID            = 0;
         List <int> RoomIDList           = new List <int>();
         List <int> ProjectIDList        = WebUtil.GetMyProjects(WebUtil.GetUser(this.Context).UserID).Where(p => p.ID != 1).Select(p => p.ID).ToList();
         int        FeeID                = 0;
         DateTime   StartChargeTime      = DateTime.MinValue;
         DateTime   EndChargeTime        = DateTime.MinValue;
         bool       IncludIsCharged      = false;
         bool       IncludePreCharge     = false;
         bool       IncludeDepoistCharge = false;
         int        DepoistStatus        = int.MinValue;
         int        PreChargeStatus      = int.MinValue;
         long       startRowIndex        = 0;
         int        pageSize             = int.MaxValue;
         string     ChargeMans           = string.Empty;
         int[]      ChargeManID          = new int[] { };
         int[]      ChargeSummaryID      = new int[] { };
         int[]      ChargeTypeID         = new int[] { };
         int[]      CategoryID           = new int[] { };
         List <int> ChargeStatusIDList   = new List <int>();
         int        RoomFeeOrderID       = 0;
         bool       IsRoomFeeSearch      = false;
         bool       IsCuiShou            = false;
         bool       ExcludeCuiShou       = false;
         List <int> HistoryIDList        = new List <int>();
         var        dg = ViewRoomFeeHistory.GetViewRoomFeeHistoryGridByRoomID(RoomIDList, ProjectIDList, FeeID, StartChargeTime, EndChargeTime, IncludIsCharged, IncludePreCharge, IncludeDepoistCharge, DepoistStatus, PreChargeStatus, CompanyID, ChargeManID, ChargeSummaryID, ChargeTypeID, CategoryID, ChargeStatusIDList, RoomFeeOrderID, IsRoomFeeSearch, IsCuiShou, ContractID, "order by [PrintNumber] desc", startRowIndex, pageSize, HistoryIDList, ExcludeCuiShou, UserID: WebUtil.GetUser(this.Context).UserID);
         list = dg.rows as ViewRoomFeeHistory[];
     }
     catch (Exception ex)
     {
         LogHelper.WriteError("AddContract.aspx", "visit: LoadRoomFeeHistoryList", ex);
     }
     return(list);
 }