private void UIDRelationUserReport_Load(object sender, EventArgs e)
        {
            try
            {
                config = new ApplicationConfiguration();
                clientSocket.connect(config.IPAddress, config.Port);

                dtBind = getUidData("AND 1=2");

                if (dtBind == null)
                {
                    return;
                }

                DataRow nuldr = dtBind.NewRow();
                nuldr["ID"] = "0";
                dtBind.Rows.InsertAt(nuldr, 0);

                BindingSource dataSource = new BindingSource(dtBind, null);
                gridUidData.DataSource = dataSource;
                for (int i = 1; i < dtBind.Rows.Count - 1; i++)
                {
                    gridUidData.Rows[i].ReadOnly = true;
                }
                gridUidData.Rows[0].Cells[0].ReadOnly = true;
            }
            catch (Exception ex)
            {
            }



            //dtBind = getUidData("");

            //if (dtBind == null || dtBind.Rows.Count == 0)
            //{
            //    return;
            //}

            //DataRow nuldr = dtBind.NewRow();
            //nuldr["ID"] = "0";
            //dtBind.Rows.InsertAt(nuldr, 0);

            //BindingSource dataSource = new BindingSource(dtBind, null);
            //gridUidData.DataSource = dataSource;
            //for (int i = 1; i < dtBind.Rows.Count - 1; i++)
            //{
            //    gridUidData.Rows[i].ReadOnly = true;
            //}
            //gridUidData.Rows[0].Cells[0].ReadOnly = true;
        }
Ejemplo n.º 2
0
        private void FinishPorductionForm_Load(object sender, EventArgs e)
        {
            Application.DoEvents();
            clientSocket.connect(config.IPAddress, config.Port);
            DataTable dtBind = GetFPData();

            DTBind = dtBind;
            if (dtBind != null)
            {
                this.pagerToolbar1.PageSize             = config.PageSizeCount;
                this.pagerToolbar1.RowCount             = dtBind.Rows.Count;
                this.pagerToolbar1.OnPagerToolBarClick += new System.EventHandler(this.pagerToolbar_Click);
                this.LoadData(this.pagerToolbar1.Inclusive, this.pagerToolbar1.Exclusive);
            }
            SetGridStatus();
            gridFGData.ColumnHeadersDefaultCellStyle.WrapMode = DataGridViewTriState.False;
            timerRefresh.Interval = 1000 * config.RefreshTimeSpan;
            timerRefresh.Enabled  = true;
        }
Ejemplo n.º 3
0
 private void CreateLocator_Load(object sender, EventArgs e)
 {
     clientSocket = new SocketClientHandler();
     config       = new ApplicationConfiguration();
     clientSocket.connect(config.IPAddress, config.Port);
 }
Ejemplo n.º 4
0
 private void PackBoxNumber_Load(object sender, EventArgs e)
 {
     config = new ApplicationConfiguration();
     clientSocket.connect(config.IPAddress, config.Port);
 }