private void btnAuth_Click(object sender, EventArgs e) { //if (btnAuth.Text="再次授权") //{ //} if (string.IsNullOrEmpty(txtAuthCard.Text)) { MetroMessageBox.Show(this, "请输入授权卡!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } ServiceRecordSvc recSvc = new ServiceRecordSvc(); var data = recSvc.Auth(txtAuthCard.Text, lblMCCode.Text); MetroMessageBox.Show(this, data.Msg, "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void btnAuth_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.txtAuthCode.Text)) { MessageBox.Show("请输入代理商给的授权码"); return; } else { ServiceRecordSvc recordSvc = new ServiceRecordSvc(); OperResult result = recordSvc.Auth(this.txtAuthCode.Text, this.lblMCCode.Text); if (result.Code == ResultCodeEnums.success) { MessageBox.Show(result.Msg); this.DialogResult = DialogResult.OK; Close(); } else { MessageBox.Show(result.Msg); } } }