Пример #1
0
        private void ThemedWindow_Loaded(object sender, RoutedEventArgs e)
        {
            this.m_pMapC2  = axMapControl_Main.GetOcx() as IMapControl2;
            this.m_pMapDoc = new MapDocumentClass();
            this.axMapControl_Main.OnMouseDown     += axMapControl_Main_OnMouseDown;
            this.axMapControl_Main.OnMouseMove     += axMapControl_Main_OnMouseMove;
            this.axMapControl_Main.OnExtentUpdated += axMapControl_Main_OnExtentUpdated;
            this.f_AddStudent           = new WxzForms.FAddStudent();
            f_AddStudent.updateDatGrid += new Update(UpdateDataTable);
            this.f_StudentInfo          = new WxzForms.FStudentInfo();



            UpdateDataTable();

            WxzUtils.Ae.SetMapControl(m_pMapC2);
            WxzUtils.Ae.SetMapDocument(m_pMapDoc);
            WxzUtils.Ae.LoadMxd("Map.mxd");
        }
Пример #2
0
        private void DataGridView_Student_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            DataRowView row = (DataRowView)DataGridView_Student.SelectedItem;

            if (row != null)
            {
                string id = row[0].ToString();
                WxzUtils.Ae.SelectStudentById(id);

                if (f_StudentInfo.IsDisposed)
                {
                    f_StudentInfo = new WxzForms.FStudentInfo();
                }
                string sid    = row[1].ToString();
                string sname  = row[2].ToString();
                string ssex   = row[3].ToString();
                string sbirth = row[4].ToString().Split(' ')[0];
                string shome  = row[5].ToString();
                f_StudentInfo.SetInfo(sid, sname, ssex, sbirth, shome);
            }
        }
Пример #3
0
        private void ShowStudentInfo()
        {
            DataRowView row = (DataRowView)DataGridView_Student.SelectedItem;

            if (row == null)
            {
                return;
            }
            string sid    = row[1].ToString();
            string sname  = row[2].ToString();
            string ssex   = row[3].ToString();
            string sbirth = row[4].ToString().Split(' ')[0];
            string shome  = row[5].ToString();

            if (f_StudentInfo.IsDisposed)
            {
                f_StudentInfo = new WxzForms.FStudentInfo();
            }
            f_StudentInfo.SetInfo(sid, sname, ssex, sbirth, shome);
            f_StudentInfo.Show();
        }