private void btnOk_Click(object sender, EventArgs e) { if (CheckInput()) { OperatorBLL bll = new OperatorBLL(AppSettings.Current.ConnStr); Operator.Password = txtNewPwd.Text; CommandResult result=bll.Update (Operator ); if (result.Result == ResultCode.Successful) { this.Close(); } else { Operator.Password = txtOldPwd.Text; MessageBox.Show(result.Message); } } }
private void btnOk_Click(object sender, EventArgs e) { if (CheckInput()) { OperatorBLL bll = new OperatorBLL(AppSettings.Current.ConnStr); Operator.Password = txtNewPwd.Text; CommandResult result = bll.Update(Operator); if (result.Result == ResultCode.Successful) { this.Close(); } else { Operator.Password = txtOldPwd.Text; MessageBox.Show(result.Message); } } }
protected override CommandResult UpdateItem(object updatingItem) { return(bll.Update(updatingItem as Operator)); }