Esempio n. 1
0
 public ActionResult <string> Post([FromBody] DataDTO item)
 {
     if (item == null)
     {
         return(BadRequest());
     }
     fileWork.Add(item);
     return(Ok(item));
 }
Esempio n. 2
0
		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);
			}
		}
Esempio n. 3
0
        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}");
            }
        }
Esempio n. 4
0
		private void CopyChildren(IFile source, IFile destination)
		{
			destination.Files.Clear();

			foreach (IFile childFile in source.Files)
			{
				destination.Add(childFile);
			}
		}
Esempio n. 5
0
 /// <summary>
 /// 添加一条数据
 /// </summary>
 /// <param name="model">数据实体</param>
 /// <returns></returns>
 public int Add(Models.APP.File model)
 {
     return(dal.Add(model));
 }
Esempio n. 6
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(Hch.iDisk.Model.File model)
 {
     dal.Add(model);
 }
Esempio n. 7
0
 /// <summary>
 /// 保存一条数据
 /// </summary>
 public int Add(ADT.XingZhi.Models.S.File model)
 {
     return(dal.Add(model));
 }