Esempio n. 1
0
        private void LoadLogInfo()
        {
            if (!Verify())
            {
                return;
            }

            string Times     = (Convert.ToDateTime(DateTimes.Text)).ToString("yyyyMMdd");
            string StartTime = (Convert.ToDateTime($"{StartHour.Text.Trim()}:{Startminute.Text.Trim()}:{Startsecond.Text.Trim()}")).ToString("HHmmss");
            string StopTime  = (Convert.ToDateTime($"{StopHour.Text.Trim()}:{Stopminute.Text.Trim()}:{Stopsecond.Text.Trim()}")).ToString("HHmmss");
            string AGVNum    = string.IsNullOrWhiteSpace(AgvNum.Text) ? "0" : AgvNum.Text;

            int Mes = MsgType.SelectedIndex;

            DataTable data = Ga_Map.PagingSelectBLL(Times, StartTime, StopTime, AGVNum, Mes, Index, Convert.ToInt32(PagSize.Text), out PageCount);

            if (data == null)
            {
                Panel.SetZIndex(Panel2, 1);
            }
            else
            {
                if (data.Rows.Count == 0)
                {
                    Panel.SetZIndex(Panel2, 1);
                }
                else
                {
                    Panel.SetZIndex(Panel2, -1);
                }
            }
            Table_Data.DataContext         = data;
            Table_Data.AutoGenerateColumns = false;

            CountData.Content = PageCount % Convert.ToInt32(PagSize.Text) == 0 ? PageCount / Convert.ToInt32(PagSize.Text) : (PageCount / Convert.ToInt32(PagSize.Text)) + 1;
            Counts.Content    = PageCount;
            PagIndex.Content  = Index;
        }