private void showEditForm(int mac_id) { CRUDResult get = ApiActions.GET(PreferenceForm.API_MAIN_URL() + "macallowed/get_at&mac_id=" + mac_id.ToString()); ServerResult sr = JsonConvert.DeserializeObject <ServerResult>(get.data); if (get.result) { MacAddressEditForm editForm = new MacAddressEditForm(); editForm.G = this.G; int id = sr.macallowed.First <MacAllowed>().id; string mac_address = sr.macallowed.First <MacAllowed>().mac_address; editForm.editing_mac_id = id; editForm.txtMacAddress.Text = mac_address; if (editForm.ShowDialog() == DialogResult.OK) { this.loadMacAddressData(mac_id); } } else { MessageAlert.Show(sr.message, "Error", MessageAlertButtons.OK, MessageAlertIcons.ERROR); } }
private void showEditForm(int mac_id) { CRUDResult get = ApiActions.GET(PreferenceForm.API_MAIN_URL() + "macallowed/get_at&mac_id=" + mac_id.ToString()); ServerResult sr = JsonConvert.DeserializeObject<ServerResult>(get.data); if (get.result) { MacAddressEditForm editForm = new MacAddressEditForm(); editForm.G = this.G; int id = sr.macallowed.First<MacAllowed>().id; string mac_address = sr.macallowed.First<MacAllowed>().mac_address; editForm.editing_mac_id = id; editForm.txtMacAddress.Text = mac_address; if (editForm.ShowDialog() == DialogResult.OK) { this.loadMacAddressData(mac_id); } } else { MessageAlert.Show(sr.message, "Error", MessageAlertButtons.OK, MessageAlertIcons.ERROR); } }