public ActionResult <string> Post([FromBody] DataDTO item) { if (item == null) { return(BadRequest()); } fileWork.Add(item); return(Ok(item)); }
static void PopulateChildFiles(IFile parent, IContainer child) { FCS.Lite.Interface.File newChild = new FCS.Lite.Interface.File(child.FileName, child.DisplayName, child.ContentId); parent.Add(newChild); foreach (IContainer ic in child.Files) { PopulateChildFiles(newChild, ic); } }
private void ButtonAdd_Click(object sender, EventArgs e) { try { switch (fileWork) { case FileWork.AddNotes: file.Add(addressTextBox.Text, int.Parse(portTextBox.Text), serverTypeComboBox.Text); break; case FileWork.EditNotes: file.Edit(indexElement, addressTextBox.Text, int.Parse(portTextBox.Text), serverTypeComboBox.Text); break; } Close(); } catch (Exception exception) { MessageBox.Show($"Произошла ошибка\n{exception.Message}"); } }
private void CopyChildren(IFile source, IFile destination) { destination.Files.Clear(); foreach (IFile childFile in source.Files) { destination.Add(childFile); } }
/// <summary> /// 添加一条数据 /// </summary> /// <param name="model">数据实体</param> /// <returns></returns> public int Add(Models.APP.File model) { return(dal.Add(model)); }
/// <summary> /// 增加一条数据 /// </summary> public void Add(Hch.iDisk.Model.File model) { dal.Add(model); }
/// <summary> /// 保存一条数据 /// </summary> public int Add(ADT.XingZhi.Models.S.File model) { return(dal.Add(model)); }