Beispiel #1
0
        public ActionResult UpdateConcreteSample(ConcreteSample1 sample)
        {
            ObjectParameter statusCode    = new ObjectParameter("StatusCode", typeof(int));
            ObjectParameter statusMessage = new ObjectParameter("StatusMessage", typeof(string));


            if (Request.Files.Count > 0)
            {
                foreach (var file in Request.Files)
                {
                    byte[]             docData = null;
                    HttpPostedFileBase docFile = Request.Files["Doc"];

                    using (var binary = new BinaryReader(docFile.InputStream))
                    {
                        docData = binary.ReadBytes(docFile.ContentLength);
                    }
                }
            }

            db.UpdateConcreteSample(sample.ReportNo, sample.ReportDate, sample.FactoryName, sample.FactoryLocation, sample.MixerNumber, sample.VisitNumber,
                                    sample.SampleNumber, sample.TruckNumber, sample.InvoiceNumber, sample.ClientName, sample.VisitLocation, sample.Latitude,
                                    sample.Longitude, sample.ConcreteRank, sample.ConcreteTemperture, sample.WaterTemperature, sample.WeatherTemperture,
                                    sample.DownAmount, sample.CementType, sample.CementSource, sample.AdditionType, sample.AdditionAmount, sample.CementWeight,
                                    sample.WaterWieght, sample.WashedSandWeight, sample.WhiteSandWeight, sample.Rubble3by4, sample.Rubble3by8, sample.IsCleanUsage,
                                    sample.IsBasicUsage, sample.IsColumnUsage, sample.IsRoofUsage, sample.IsOtherUsage, sample.IsCleanLocation, sample.CleanDocPath,
                                    sample.IsDustControlInStation, sample.DustDocPath, sample.IsRokamSummer, sample.SummerDocPath, sample.IsLabEngineer, sample.LabDocPath,
                                    sample.IsMoldanatInTrucks, sample.TruckDocPath, sample.IsPeopleSafty, sample.SafteyDocPath, 2, null, statusCode, statusMessage
                                    , sample.OtherReason, sample.CleanDocNote, sample.DustDocNote, sample.SummerDocNote, sample.LabDocNote, sample.TruckDocNote, sample.SafteyDocNote);


            return(RedirectToAction("ConcreteSampleReports", "ConcreteFactoryReports"));
        }