예제 #1
0
 private void frmConfig_Load(object sender, EventArgs e)
 {
     gridControl1.DataSource = ZoneLab.getInstance().ZoneLists;
     gridView1.BestFitColumns();
     gridControl2.DataSource = PersonLab.getInstance().PersonList;
     gridView2.BestFitColumns();
     AnimateWindow(this.Handle, 500, AW_BLEND | AW_ACTIVE);
 }
        public void LoadingData(string uuid)
        {
            m_pUUID = uuid;
            Inspector pIstor = InspectorsLab.getInstance().GetInspectorByUUID(uuid);

            lbCaption.Text = string.Format("{0}-【{1}巡守】", pIstor.ZoneName, pIstor.ZoneLevel == 2?"限速":"扣车");
            sbtnStart.Text = s1;
            if (pIstor.InspectorState.Equals("0"))
            {
                sbtnStop.Enabled = false;
                radioGroupPerson.Properties.Items.Clear();
                foreach (Person p in PersonLab.getInstance().PersonList)
                {
                    if (p.PersonState.Equals("0"))
                    {
                        radioGroupPerson.Properties.Items.Add(new DevExpress.XtraEditors.Controls.RadioGroupItem(p.PersonPhone, string.Format("{0}-{1}", p.PersonName, p.PersonPhone)));
                    }
                }
                radioGroupPerson.Enabled = true;
            }
            if (pIstor.InspectorState.Equals("1"))
            {
                radioGroupPerson.Properties.Items.Clear();
                radioGroupPerson.Properties.Items.Add(new DevExpress.XtraEditors.Controls.RadioGroupItem(pIstor.PersonPhone, string.Format("{0}-{1}", pIstor.PersonName, pIstor.PersonPhone)));
                radioGroupPerson.Enabled = false;
                if (!string.IsNullOrEmpty(pIstor.WorkNumber))
                {
                    txtWorkNumber.Enabled = false;
                    sbtnStop.Enabled      = true;
                    EnabledNumberButton(false);
                }
                else
                {
                    sbtnStart.Text   = s2;
                    sbtnStop.Enabled = false;
                }
            }
            if (!string.IsNullOrEmpty(pIstor.WorkNumber))
            {
                sbtnStart.Enabled  = false;
                sbtnStop.Enabled   = true;
                txtWorkNumber.Text = pIstor.WorkNumber;
            }
            else
            {
                sbtnStart.Enabled = true;
                sbtnStop.Enabled  = false;
            }
        }
예제 #3
0
 public void BindingPersonList()
 {
     PersonGridControl.DataSource = PersonLab.getInstance().PersonList;
     PersonGridView.ActiveFilter.NonColumnFilter = m_pFilter;
 }