예제 #1
0
        private void InsertAgent()
        {
            try
            {
                if (txtName.Text != string.Empty && !isGroupSaved)
                {
                    monitorDb.InsertAgentGroup(txtName.Text);
                    txtName.Text = "";
                    isGroupSaved = true;
                }
                else
                {
                    lblmsg.Visible = true;
                    lblmsg.Text    = "Input can not be empty!";
                }

                LoadData();
            }
            catch (Exception e)
            {
                throw new Exception($"Unable to insert the Agent:{e.Message}");
            }
        }