Example #1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (txtThooName.Text.Equals(""))
     {
         MessageBox.Show("aaa", "aaa");
         return;
     }
     if (txtThooCode.Text.Equals(""))
     {
         MessageBox.Show("aaa", "aaa");
         return;
     }
     if (txtThooId.Text.Equals(""))
     {
         tho = lc.thodb.selectByCode(txtThooCode.Text);
         if (!tho.Code.Equals(""))
         {
             MessageBox.Show("aaaa", "aaaa");
             return;
         }
     }
     tho = getControl();
     //color = tho.Color;
     if (lc.saveThoo(tho).Length >= 1)
     {
         MessageBox.Show("บันทึกข้อมูล เรียบร้อย", "บันทึกข้อมูล");
         this.Dispose();
         //this.Hide();
     }
 }