Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
        public void Test_GetForcePowerDescriptors_WithOutOrderBy_NoResult()
        {
            string strWhere   = "ForcePowerDescriptorName Like '%Toad%'";
            string strOrderBy = "";

            ForcePowerDescriptor        objForcePowerDescriptor  = new ForcePowerDescriptor();
            List <ForcePowerDescriptor> lstForcePowerDescriptors = new List <ForcePowerDescriptor>();

            lstForcePowerDescriptors = objForcePowerDescriptor.GetForcePowerDescriptors(strWhere, strOrderBy);

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