Пример #1
0
        public void TestSetup()
        {
            busTraffic       = new BTraffic();
            basic_testObject = new BasicTraffic();

            groupPrecardTA.Insert("TestPrecardGroup", "TestGroup1");
            DatasetGatewayWorkFlow.TA_PrecardGroupsDataTable groupTable;
            groupTable  = groupPrecardTA.GetDataByName("TestGroup1");
            ADOGroup.ID = Convert.ToDecimal(groupTable.Rows[0][0]);

            precardTA.Insert("TestPish1", true, ADOGroup.ID, true, false, false, "1001", false);

            DatasetGatewayWorkFlow.TA_PrecardDataTable precardTable = new DatasetGatewayWorkFlow.TA_PrecardDataTable();
            precardTable   = precardTA.GetDataByName("TestPish1");
            ADOPrecard1.ID = Convert.ToDecimal(precardTable.Rows[0][0]);

            basicTA.InsertQuery(ADOPrecard1.ID, ADOPerson1.ID, DateTime.Now, 100, false, true);
            DatabaseGateway.TA_BaseTrafficDataTable baseTable = basicTA.GetDataByPerson(ADOPerson1.ID);
            ADOBasic1.ID = Convert.ToDecimal(baseTable.Rows[0][0]);
        }
Пример #2
0
        /// <summary>
        /// ترددهای یک کاربر را برمیگرداند
        /// </summary>
        /// <returns></returns>
        public IList <ProceedTrafficProxy> GetClientTraffic(string clientUsername, DateTime fromDate, DateTime toDate)
        {
            BUser   busUser = new BUser();
            decimal prsId   = busUser.GetPersonIdByUsername(clientUsername);
            IList <ProceedTrafficProxy> proxyList = new List <ProceedTrafficProxy>();

            if (prsId > 0 && fromDate > Utility.GTSMinStandardDateTime && toDate > Utility.GTSMinStandardDateTime)
            {
                proxyList = new BTraffic().GetAllTrafic(prsId, fromDate, toDate);
            }
            else if (prsId <= 0)
            {
                throw new Exception("نام کاربری یافت نشد");
            }
            else
            {
                throw new Exception("فرمت تاریخ نادرست است");
            }
            return(proxyList);
        }
Пример #3
0
        protected void Button3_Click(object sender, EventArgs e)
        {
            BTraffic bus = new BTraffic();

            bus.GetPersonDailyReport(32688, Utility.ToString(new DateTime(2012, 2, 20)));
        }