Exemple #1
0
        //private bool CheckExist( string sn )
        //{
        //    sn = sn.Trim();
        //    return XGDB.CheckCardSNExist(.CheckCardSNExist( sn );
        //}


        private void btnOK_Click(object sender, System.EventArgs e)
        {
            if (!CheckStationName(XGStationName))
            {
                MsgBox.Show("站名错误!");
                return;
            }

            if (!CheckAddress(txtAddress.Text))
            {
                return;
            }

            bool nameExist;

            nameExist = XGDB.CheckXGStationNameExist(XGStationName.Trim(), _editId);
            if (nameExist)
            {
                MsgBox.Show("站名已经存在!");
                return;
            }
            DialogResult = DialogResult.OK;
            Close();
        }