private void FormRegister_BtOk(object sender, EventArgs e) { if (tb_psw.Value.ToString() != tb_RePwd.Value.ToString()) { ZwMessageBox.ShowMsg("两次密码输入不一致"); return; } AHAgent agent = new AHAgent() { PhoneNum = tb_Phone.Value.ToString(), Password = tb_psw.Value.ToString(), Email = tb_Email.Value.ToString(), ShopName = tb_ShopName.ToString(), ReMarks = tb_Remark.ToString() }; string msg = string.Empty; if (!UserBLL.Instance.RegisterShop(agent, ref msg)) { ZwMessageBox.ShowMsg(msg); } this.DialogResult = System.Windows.Forms.DialogResult.OK; }
private void FormLogin_BtOk(object sender, EventArgs e) { AHUsers usr = new AHUsers() { PhoneNum = tb_Phone.Value.ToString(), Password = tb_Code.Value.ToString() }; string msg = string.Empty; if (!UserBLL.Instance.Login(usr, ref msg)) { ZwMessageBox.ShowMsg(msg); } this.DialogResult = System.Windows.Forms.DialogResult.OK; }