public async Task <IActionResult> AddNewFormDelivery(AddFormDeliveryModel model)
        {
            FormDeliveryDTO newItem = new FormDeliveryDTO()
            {
                FormDeliveryName = model.nameFormDelivery
            };

            await formDelivery.Create(newItem);

            return(RedirectToAction("GetFormDelivery", "AdminDepartment"));
        }
        public async Task <OperationDetails> Create(FormDeliveryDTO DTO)
        {
            FormDelivery newItem = new FormDelivery()
            {
                NameDelivery = DTO.FormDeliveryName
            };

            Database.RFormDelivery.Create(newItem);
            await Database.Save();

            return(new OperationDetails(true, "Registration success", ""));
        }
        public FormDeliveryDTO FindFormDelivery(string name)
        {
            FormDelivery    item = Database.RFormDelivery.Get(name);
            FormDeliveryDTO DTO  = null;

            if (item != null)
            {
                DTO = new FormDeliveryDTO();

                DTO.Id_FormDelivery  = item.IdDelivery;
                DTO.FormDeliveryName = item.NameDelivery;
            }

            return(DTO);
        }