private void btnQuery_Click(object sender, EventArgs e)
        {
            var con = new DeviceReadLogSearchCondition();
            con.ReadDateRange = new DateTimeRange(ucDateTimeInterval1.StartDateTime, ucDateTimeInterval1.EndDateTime);
            var deivces = ucDivision1.GetSelectedDevices();
            if (deivces != null && deivces.Count > 0) con.Devices = deivces.Select(it => it.ID).ToList();
            if (!string.IsNullOrEmpty(cmbDeviceType.Text)) con.DeviceType = (DeviceType)cmbDeviceType.SelectedIndex;

            var items = new DeviceReadLogBLL(AppSettings.Current.ConnStr).GetItems(con).QueryObjects;
            ShowItemsOnGrid(items);
        }
Example #2
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            var con = new DeviceReadLogSearchCondition();

            con.ReadDateRange = new DateTimeRange(ucDateTimeInterval1.StartDateTime, ucDateTimeInterval1.EndDateTime);
            var deivces = ucDivision1.GetSelectedDevices();

            if (deivces != null && deivces.Count > 0)
            {
                con.Devices = deivces.Select(it => it.ID).ToList();
            }
            if (!string.IsNullOrEmpty(cmbDeviceType.Text))
            {
                con.DeviceType = (DeviceType)cmbDeviceType.SelectedIndex;
            }

            var items = new DeviceReadLogBLL(AppSettings.Current.ConnStr).GetItems(con).QueryObjects;

            ShowItemsOnGrid(items);
        }