public void Operator_GetFilterRequest1()
        {
            busRegisteredRequest = new BKartabl(ADOPerson1.ID, ADOUser1.ID, ADOUser1.UserName);
            UserRequestFilterProxy proxy = new UserRequestFilterProxy();

            proxy.ToDate = Utility.ToPersianDate(new DateTime(2010, 5, 1));
            IList <KartablProxy> list = busRegisteredRequest.GetFilterUserRequests(proxy, 0, 10);

            Assert.AreEqual(1, list.Count);
            Assert.AreEqual(ADORequestHourlyLeave1.ID, list.First().RequestID);
        }
 public void GetRequest_Filter_Test2()
 {
     try
     {
         busRegisteredRequest = new BKartabl(ADOPerson5.ID, ADOUser5.ID, ADOUser5.UserName);
         UserRequestFilterProxy proxy = new UserRequestFilterProxy();
         proxy.RequestType = RequestType.Daily;
         IList <KartablProxy> list = busRegisteredRequest.GetFilterUserRequests(proxy, 0, 10);
         Assert.AreEqual(1, list.Count);
         Assert.IsTrue(list.Where(x => x.ID == ADORequestDailyLeave1.ID).Count() == 1);
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }
 public void GetRequest_Filter_Test3()
 {
     try
     {
         busRegisteredRequest = new BKartabl(ADOPerson3.ID, ADOUser3.ID, ADOUser3.UserName);
         UserRequestFilterProxy proxy = new UserRequestFilterProxy();
         proxy.ToDate = Utility.ToPersianDate(new DateTime(2010, 5, 1));
         IList <KartablProxy> list = busRegisteredRequest.GetFilterUserRequests(proxy, 0, 10);
         Assert.AreEqual(1, list.Count);
         Assert.IsTrue(list.Where(x => x.RequestID == ADORequestHourlyLeave1.ID).Count() == 1);
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }
        public void Test222222222222()
        {
            ClearSession();
            base.UpdateCurrentUserPersonId(32688);

            BKartabl b = new BKartabl();

            busRegisteredRequest = new BKartabl();
            UserRequestFilterProxy proxy = new UserRequestFilterProxy();

            proxy.RequestType = RequestType.Daily;
            IList <KartablProxy> list = busRegisteredRequest.GetAllUserRequests(RequestState.UnKnown, 1390, 12, 0, 14);

            list = busRegisteredRequest.GetFilterUserRequests(proxy, 0, 10);
            busRegisteredRequest.GetAllUserRequests(RequestState.UnKnown, 1390, 10, 0, 12);
            busRegisteredRequest.GetAllUserRequests(RequestState.UnKnown, 1390, 10, 1, 12);
        }
 public void GetRequest_Filter_Test1()
 {
     try
     {
         UserRequestFilterProxy proxy = new UserRequestFilterProxy();
         proxy.RequestType = RequestType.Hourly;
         IList <KartablProxy> list = busRegisteredRequest.GetFilterUserRequests(proxy, 0, 10);
         Assert.AreEqual(3, list.Count);
         Assert.IsTrue(list.Where(x => x.ID == ADORequestHourlyLeave1.ID).Count() == 1);
         Assert.IsTrue(list.Where(x => x.ID == ADORequestHourlyLeave2.ID).Count() == 1);
         Assert.IsTrue(list.Where(x => x.ID == ADORequestHourlyDuty1.ID).Count() == 1);
     }
     catch (Exception ex)
     {
         Assert.Fail(ex.Message);
     }
 }