Exemplo n.º 1
0
 public ActionResult Create(Familia model)
 {
     try
     {
         // TODO: Add insert logic here
         db.FamiliasSet.Add(model);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
Exemplo n.º 2
0
        public ActionResult SaveData(FeedbackForm1 _feedBack)
        {
            var _file     = _feedBack.ProjectInformation;
            var _fileName = _file.FileName;

            byte[] bytes;
            using (BinaryReader br = new BinaryReader(_file.InputStream))
            {
                bytes = br.ReadBytes(_file.ContentLength);
            }
            FeedbackForm forms = _feedBack.fs;

            //var _myData = bytes;
            forms.ProjectInformation = bytes;
            forms.FileName           = _fileName;
            _db.FeedbackForm.Add(forms);
            _db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemplo n.º 3
0
 public void Save()
 {
     _context.SaveChanges();
 }