public void FillDropDownLists()
        {
            cmbForcePowerDescriptorType.Items.Clear();

            ForcePowerDescriptor FPD = new ForcePowerDescriptor();

            forcePowerDescriptor = FPD.GetForcePowerDescriptors("", "ForcePowerDescriptorName");
            cmbForcePowerDescriptorType.Items.Add("");
            foreach (ForcePowerDescriptor lstFPD in forcePowerDescriptor)
            {
                //cmbForcePowerDescriptorType.ValueMember = "'ForcePowerDescriptorID";
                //cmbForcePowerDescriptorType.DisplayMember = "ForcePowerDescriptorName";
                //cmbForcePowerDescriptorType.DataSource = forcePowerDescriptor;
                cmbForcePowerDescriptorType.Items.Add(lstFPD.ForcePowerDescriptorName);
            }

            this.cmbTurnSegment.Items.Clear();

            TurnSegment turnSeg = new TurnSegment();

            turnSegment = turnSeg.GetTurnSegments("", "TurnSegmentDescription");
            cmbTurnSegment.Items.Add("");
            foreach (TurnSegment lstTurnSegment in turnSegment)
            {
                cmbTurnSegment.Items.Add(lstTurnSegment.TurnSegmentDescription);
            }
            if (dbconn.Open)
            {
                dbconn.CloseDatabaseConnection();
            }
        }
Example #2
0
        public void Test_GetTurnSegments_WithOutOrderBy_NoResult()
        {
            string strWhere   = "TurnSegmentName Like '%Toad%'";
            string strOrderBy = "";

            TurnSegment        objTurnSegment  = new TurnSegment();
            List <TurnSegment> lstTurnSegments = new List <TurnSegment>();

            lstTurnSegments = objTurnSegment.GetTurnSegments(strWhere, strOrderBy);

            Assert.IsTrue(lstTurnSegments.Count == 0);
        }