private void SubAsrsSetArea() { clsASRS.gsHostName = System.Net.Dns.GetHostName(); //Host Name clsASRS.gsAreaNo = clsASRS.FunGetAreaNo(clsASRS.gsHostName); //Area No string sAreaName = ""; //clsASRS.gsAreaNo = ""; if (clsASRS.gsAreaNo == "") { frmSetPC frm1 = new frmSetPC(); if (frm1.ShowDialog() != DialogResult.OK) { clsDB.FunClsDB(); Application.Exit(); } else { sAreaName = clsASRS.FunGetAreaName(clsASRS.gsAreaNo); //Area Name tsl1.Text = clsASRS.gsAreaNo + ":" + sAreaName; } } else { sAreaName = clsASRS.FunGetAreaName(clsASRS.gsAreaNo); //Area Name tsl1.Text = clsASRS.gsAreaNo + ":" + sAreaName; } }
private void mniSetArea_Click(object sender, EventArgs e) { if (clsDB.FunOpenDB() == false) // Open Database { clsMSG.ShowErrMsg(clsMSG.MSG.OPEN_DB_NG); return; } clsASRS.gsHostName = System.Net.Dns.GetHostName(); //Host Name frmSetPC frm1 = new frmSetPC(); frm1.ShowDialog(); string sAreaName = clsASRS.FunGetAreaName(clsASRS.gsAreaNo); //Area Name tsl1.Text = clsASRS.gsAreaNo + ":" + sAreaName; clsDB.FunClsDB(); }