public bool AdminTestUpdate(int Id, AdminChemicalTestModel model)
        {
            var data = (from p in dbcontext.TblAdminChemicalTests.Where(x => x.Id == Id) select p).FirstOrDefault();

            data.TestCondition    = model.TestCondition;
            data.TestDescription  = model.TestDescription;
            data.TestFile         = model.TestFile;
            data.TestGreaterThan  = model.TestGreaterThan;
            data.TestLessthan     = model.TestLessthan;
            data.TestMax          = model.TestMax;
            data.TestMin          = model.TestMin;
            data.TestName         = model.TestName;
            data.TestType         = model.TestType;
            data.TestType1        = model.TestType1;
            data.UnitOfMeasurment = model.UnitOfMeasurment;
            // data.CreatedBy = model.CreatedBy;
            // data.CreatedDate = model.CreatedDate;
            data.LogedInUser  = model.LogedInUser;
            data.ModifiedBy   = model.ModifiedBy;
            data.ModifiedDate = DateTime.Now.ToString();


            dbcontext.SaveChanges();
            return(true);
        }
        public bool AdminUpdate(int Id, AdminModel model)
        {
            var data = (from p in dbcontext.TblAdminMasters.Where(x => x.Id == Id) select p).FirstOrDefault();

            data.Admin1      = model.Admin1;
            data.Admin2      = model.Admin2;
            data.Admin3      = model.Admin3;
            data.Admin4      = model.Admin4;
            data.Admin5      = model.Admin5;
            data.Description = model.Description;
            data.Name        = model.Name;

            dbcontext.SaveChanges();
            return(true);
        }
Exemplo n.º 3
0
        public bool AdminIncubatorUpdate(int Id, AdminIncubatorModel model)
        {
            var data = (from p in dbcontext.TblAdminIncubators.Where(x => x.IncubatorId == Id) select p).FirstOrDefault();

            data.IncubatorDescription = model.IncubatorDescription;
            data.IncubatorName        = model.IncubatorName;
            //data.CreatedBy = model.CreatedBy;
            //data.CreatedDate = model.CreatedDate;
            data.LogedInUser  = model.LogedInUser;
            data.ModifiedBy   = model.ModifiedBy;
            data.ModifiedDate = DateTime.Now.ToString();


            dbcontext.SaveChanges();
            return(true);
        }
        public bool AdminTestGroupingUpdate(int Id, AdminTestGroupingModel model)
        {
            var data = (from p in dbcontext.TblTestGroupings.Where(x => x.TestGroupId == Id) select p).FirstOrDefault();

            // TblTestGrouping obj = new TblTestGrouping();
            //obj.TestGroupId = model.TestGroupId;
            data.TestGroupDescription      = model.TestGroupDescription;
            data.TestGroupName             = model.TestGroupName;
            data.SelectedIds               = model.SelectedIds;
            data.MappedSampleIdToTestGroup = model.MappedSampleIdToTestGroup;
            data.ModifiedBy   = model.ModifiedBy;
            data.ModifiedDate = DateTime.Now.ToString();


            dbcontext.SaveChanges();
            return(true);
        }
        public bool WaterModelScheduleUpdate(int Id, ScheduleModel model)
        {
            var data = (from p in dbcontext.TblSchedules.Where(x => x.ScheduleId == Id) select p).FirstOrDefault();

            // TblTestGrouping obj = new TblTestGrouping();
            //obj.TestGroupId = model.TestGroupId;
            data.FrequencyDays   = model.FrequencyDays;
            data.FrequencyNumber = model.FrequencyNumber;
            data.SampleId        = model.SampleId;
            //data.ScheduleId = model.ScheduleId;
            data.SampleLocation = model.SampleLocation;
            data.SampleType     = model.SampleType;
            data.ScheduleDate   = model.ScheduleDate;

            data.ModifiedBy   = model.ModifiedBy;
            data.ModifiedDate = DateTime.Now.ToString();


            dbcontext.SaveChanges();
            return(true);
        }
Exemplo n.º 6
0
        public bool AdminTestUpdate(int Id, AdminSampleModel model)
        {
            var data = (from p in dbcontext.TblAdminSamples.Where(x => x.Id == Id) select p).FirstOrDefault();

            data.Frequncy        = model.Frequncy;
            data.Remarks         = model.Remarks;
            data.SampleLocation1 = model.SampleLocation1;
            data.SampleLocation2 = model.SampleLocation2;
            data.SampleLocation3 = model.SampleLocation3;
            data.SampleLocation4 = model.SampleLocation4;
            data.SampleName      = model.SampleName;
            data.SampleType      = model.SampleType;
            data.SelectFrequncy  = model.SelectFrequncy;
            //data.CreatedBy = model.CreatedBy;
            // data.CreatedDate = model.CreatedDate;
            data.LogedInUser  = model.LogedInUser;
            data.ModifiedBy   = model.ModifiedBy;
            data.ModifiedDate = DateTime.Now.ToString();

            var objschedule = (from p in dbcontext.TblSchedules.Where(x => x.SampleId == Id) select p).FirstOrDefault();


            objschedule.SampleLocation = model.SampleLocation4;
            objschedule.SampleType     = model.SampleType;
            objschedule.SampleName     = model.SampleName;

            // objschedule.ScheduleDate = DateTime.Now.ToString();
            objschedule.SampleName  = model.SampleName;
            objschedule.CreatedBy   = model.CreatedBy;
            objschedule.createdDate = DateTime.Now.ToString();

            objschedule.ModifiedBy   = model.ModifiedBy;
            objschedule.ModifiedDate = DateTime.Now.ToString();


            dbcontext.SaveChanges();
            return(true);
        }