Exemplo n.º 1
0
 public static DbManger getInstance()
 {
     if (instance == null)
     {
         instance = new DbManger();
     }
     return(instance);
 }
Exemplo n.º 2
0
        private void materialRaisedButton1_Click(object sender, EventArgs e)
        {
            string name = nameTextField.Text;
            string age  = ageTextField2.Text;
            string addr = addrTextField3.Text;

            //공백인지 아닌지 체크
            if (name == "" || age == "" || addr == "")
            {
                MessageBox.Show("입력하세요", "입력오류",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Warning);
            }
            else
            {
                DbManger.getInstance().insertDB(name, Convert.ToInt32(age), addr);
                Close();
            }
        }