Exemple #1
0
 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);
			}
		}
Exemple #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}");
            }
        }
Exemple #4
0
		private void CopyChildren(IFile source, IFile destination)
		{
			destination.Files.Clear();

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