public async Task CreateOrEditField(FieldInput input) { if (input.id > 0) { await UpdateField(input); } else { await CreateField(input); } }
private async Task CreateField(FieldInput input) { var obj = new Field(); obj.ColName = input.ColName; obj.ColType = input.ColType; obj.IsNull = input.IsNull; obj.Order = 1; obj.MenuItemDefine_MenuGuid = input.MenuItemDefine_MenuGuid; await _fieldRepository.InsertAsync(obj); await CurrentUnitOfWork.SaveChangesAsync(); }
private async Task UpdateField(FieldInput input) { var obj = _fieldRepository.Get(input.id); if (obj != null) { obj.ColName = input.ColName; obj.ColType = input.ColType; obj.IsNull = input.IsNull; obj.Order = 1; await _fieldRepository.UpdateAsync(obj); } }
public void Show(MyCodeLine ln) { if (Editing != null) { Editing.gameObject.SetActive(true); } gameObject.SetActive(true); FieldInput.Rect().SetSize(ln.Rect().GetSize()); FieldInput.Rect().transform.localPosition = (ln.Rect().transform.localPosition); FieldInput.text = ln.Text; FieldInput.ActivateInputField(); ln.gameObject.SetActive(false); Editing = ln; }
public Task CreateOrEditField(FieldInput input) { throw new NotImplementedException(); }