| | |
| | | /// <summary> |
| | | /// 返回数据事件 |
| | | /// </summary> |
| | | public event Action<Yw.Vmo.User> ReloadDataEvent; |
| | | public event Action<Yw.Vmo.UserVmo> ReloadDataEvent; |
| | | |
| | | //验证 |
| | | private async Task<bool> Valid() |
| | |
| | | //确定 |
| | | private async void GeneralOkAndCancelCtrl1_OkEvent() |
| | | { |
| | | var vmo = new Yw.Vmo.User(); |
| | | var vmo = new Yw.Vmo.UserVmo(); |
| | | if (!await Valid()) |
| | | { |
| | | return; |
| | | } |
| | | vmo.Name = this.txtName.Text.Trim(); |
| | | vmo.LoginName = this.txtLoginName.Text.Trim(); |
| | | vmo.LoginPwd = this.txtPwd.Text.Trim(); |
| | | vmo.CorpID = GlobalParas._GlobalParas.CorpID; |
| | | var LoginName = this.txtLoginName.Text.Trim(); |
| | | var LoginPwd = this.txtPwd.Text.Trim(); |
| | | vmo.CorpID = LoginUserInfo.CorpID; |
| | | vmo.Description = this.txtDescription.Text.Trim(); |
| | | vmo.Tag = this.txtTagName.Text.Trim(); |
| | | vmo.UseStatus = Yw.Vmo.eUseStatus.Disable; |
| | | var id = await BLLFactory<Yw.BLL.User>.Instance.Insert(vmo); |
| | | vmo.UseStatus = Yw.Model.eUseStatus.Enable; |
| | | var id = await BLLFactory<Yw.BLL.User>.Instance.Insert(vmo, LoginName, LoginPwd); |
| | | if (id < 1) |
| | | { |
| | | TipFormHelper.ShowError("添加失败!"); |