예제 #1
0
        private IEnumerable <ListReqVahed> GetData()
        {
            CheckOutRequestBusiness reqBusiness = new CheckOutRequestBusiness();
            var idVahed     = drpUniversity.SelectedItem.Value;
            var startDate   = StartDateTxt.Text;
            var endDate     = EndDateTxt.Text;
            var MadrakType  = 2;
            var listByVahed = reqBusiness.GetListOFRequestByVahedAndDate(Convert.ToInt32(idVahed), startDate, endDate, Convert.ToInt32(MadrakType));
            var vahedList   = RequestHandler.ConvertDataTableToList <ListReqVahed>(listByVahed);

            switch (drpReportType.SelectedItem.Value)
            {
            case "1":
                return(vahedList.Where(w => w.DateApprovePay == null && w.DateSendToPay == null));

            case "2":
                return(vahedList.Where(w => w.DateSendToPay != null));

            case "3":
                return(vahedList);
            }
            //if (drpReportType.SelectedItem.Value == "1")
            //return vahedList.Where(w => w.DateApprovePay == null && w.DateSendToPay == null);
            //else
            return(vahedList.Where(w => w.DateSendToPay != null));
        }
        private IEnumerable <ListReqVahed> GetData()
        {
            CheckOutRequestBusiness reqBusiness = new CheckOutRequestBusiness();
            var idVahed     = drpUniversity.SelectedItem.Value;
            var startDate   = StartDateTxt.Text;
            var endDate     = EndDateTxt.Text;
            var MadrakType  = drpTypeMadrak.SelectedItem.Value;
            var listByVahed = reqBusiness.GetListOFRequestByVahedAndDate(Convert.ToInt32(idVahed), startDate, endDate, Convert.ToInt32(MadrakType));
            var vahedList   = RequestHandler.ConvertDataTableToList <ListReqVahed>(listByVahed);

            //var fareghNull = reqBusiness.GetListOFApproveList();
            //var nullFaregh = RequestHandler.ConvertDataTableToList<ApproveList>(fareghNull);
            //return from x in nullFaregh
            //          where x.ApproveDateMali == null
            //          join y in vahedList
            //          on x.StudentRequestId equals y.StudentRequestID
            //          select y;
            return(vahedList.Where(w => w.DateApprovePay == null && w.DateSendToPay != null));



            //return nullFaregh.Join(nullFaregh, vahed=> vahed.StudentRequestId, faregh=> faregh.StudentRequestId, (vahed, faregh) => new );//vahedList.Where(w => !nullFaregh.Contains(w.StudentRequestID));
        }
예제 #3
0
        private IEnumerable <ListReqVahed> GetData()
        {
            CheckOutRequestBusiness reqBusiness = new CheckOutRequestBusiness();
            var idVahed     = drpUniversity.SelectedItem.Value;
            var startDate   = StartDateTxt.Text;
            var endDate     = EndDateTxt.Text;
            var MadrakType  = 2;
            var listByVahed = reqBusiness.GetListOFRequestByVahedAndDate(Convert.ToInt32(idVahed), startDate, endDate, Convert.ToInt32(MadrakType));
            var vahedList   = RequestHandler.ConvertDataTableToList <ListReqVahed>(listByVahed);

            //var fareghNull = reqBusiness.GetListOFApproveList();
            //var nullFaregh = RequestHandler.ConvertDataTableToList<ApproveList>(fareghNull)
            //    .Where(w=> w.ApproveDateFaregh != null && w.ApproveDateMali != null)
            //    .Select(s => s.StudentRequestId);
            switch (drpReportType.SelectedItem.Value)
            {
            case "1":
                return(vahedList.Where(w => w.DateApprovePay != null && w.DateSendToPay != null));   //nullFaregh.Contains(w.StudentRequestID)

            case "2":
                return(vahedList);
            }
            return(vahedList.Where(w => w.DateApprovePay != null && w.DateSendToPay != null));//nullFaregh.Contains(w.StudentRequestID)
        }