public void Operator_InsertRequest_OnePerson_Test()
        {
            try
            {
                int count1 = requestTA.GetDataByPersonId(ADOPerson3.ID).Rows.Count;

                busRegisteredRequest = new BKartabl(ADOPerson1.ID, ADOUser1.ID, ADOUser1.UserName);

                request_testObject.TheFromDate = Utility.ToPersianDate(new DateTime(2011, 12, 24));
                request_testObject.TheToDate   = Utility.ToPersianDate(new DateTime(2011, 12, 24));
                request_testObject.TheFromTime = "10:00";
                request_testObject.TheToTime   = "11:00";
                request_testObject.Precard     = new Precard()
                {
                    ID = ADOPrecardHourlyLeave1.ID
                };

                busRegisteredRequest.InsertRequest(request_testObject, 1390, 10, ADOPerson3.ID);
                ClearSession();
                Assert.IsTrue(request_testObject.ID > 0);
                Request request = new BRequest().GetByID(request_testObject.ID);
                Assert.AreEqual(request.ID, request_testObject.ID);
                int count2 = requestTA.GetDataByPersonId(ADOPerson3.ID).Rows.Count;
                Assert.AreEqual(count1 + 1, count2);
            }
            catch (Exception ex)
            {
                Assert.Fail();
            }
            finally
            {
                ClearSession();
                busRegisteredRequest.DeleteRequest(request_testObject.ID);
            }
        }
        public void Insert_Test()
        {
            try
            {
                request_testObject.TheFromDate = Utility.ToPersianDate(new DateTime(2011, 12, 24));
                request_testObject.TheToDate   = Utility.ToPersianDate(new DateTime(2011, 12, 24));
                request_testObject.TheFromTime = "10:00";
                request_testObject.TheToTime   = "11:00";
                request_testObject.Precard     = new Precard()
                {
                    ID = ADOPrecardHourlyLeave1.ID
                };

                busRegisteredRequest.InsertRequest(request_testObject, 1390, 10);
                ClearSession();
                Assert.IsTrue(request_testObject.ID > 0);
                Request request = new BRequest().GetByID(request_testObject.ID);
                Assert.AreEqual(request.ID, request_testObject.ID);
            }
            catch (Exception ex)
            {
                Assert.Fail();
            }
            finally
            {
                ClearSession();
                busRegisteredRequest.DeleteRequest(request_testObject.ID);
            }
        }