Esempio n. 1
0
 private void menuItemCommune_Click(object sender, EventArgs e)
 {
     ToolStripMenuItem toolStripMenuItem = (ToolStripMenuItem)sender;
     this.toolStripXa.Text = toolStripMenuItem.Text;
     XaEntity xaEntity = ManageBase.SelectXaByXaId((int)toolStripMenuItem.Tag);
     GlobalVariable.XaId = xaEntity.XaId;
     GlobalVariable.MaXa = xaEntity.MaXa;
     GlobalVariable.TenXa = xaEntity.TenXa;
     this.frmThongTinHoSo.ClearData();
     this.Text = "Phần mềm quản lý hồ sơ đo vẽ; " + GlobalVariable.TenXa + " - " + GlobalVariable.TenHuyen;
 }
Esempio n. 2
0
        public static XaEntity SelectXaByXaId(int xaId)
        {
            XaEntity result = null;

            using (DataAccessAdapterBase dataAccessAdapterBase = new DataAccessAdapter(ManageBase.ConnectionString))
            {
                XaEntity xaEntity = new XaEntity(xaId);
                bool     flag     = dataAccessAdapterBase.FetchEntity(xaEntity);
                if (flag)
                {
                    result = xaEntity;
                }
            }
            return(result);
        }