Exemplo n.º 1
0
        public async Task <ActionResult> CreateAsync(UserViewModel userVM)
        {
            User user = new User
            {
                Id             = userVM.Id,
                IdentityNumber = userVM.IdentityNumber,
                Name           = userVM.Name,
                LastName       = userVM.LastName,
                Email          = userVM.Email,
                IsActive       = userVM.IsActive,
                Phone          = userVM.Phone,
                RoleId         = userVM.RoleId,
            };

            ICryptoService cryptoService = new PBKDF2();
            //New User
            string password = userVM.Password;
            //save this salt to the database
            string passwordHashedSalt = cryptoService.GenerateSalt();
            //save this hash to the database
            string passwordHashed = cryptoService.Compute(password);

            user.PasswordHashedSalt = passwordHashedSalt;
            user.PasswordHashed     = passwordHashed;

            if (ModelState.IsValid)
            {
                _context.Add(user);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(userVM));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("Id,Kod,Hacim")] Enzyme enzyme)
        {
            if (ModelState.IsValid)
            {
                _context.Add(enzyme);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(enzyme));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("Id,MixBCode,Aciklama,HazirlamaTarihi")] OligoNucleotideMixB oligoNucleotideMixB)
        {
            if (ModelState.IsValid)
            {
                _context.Add(oligoNucleotideMixB);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(oligoNucleotideMixB));
        }
        public async Task <IActionResult> Create([Bind("Id,SiparisKodu,SiparisTarihi,AlinmaTarihi,HedefGenTur,OligoNucleotideType,BesIsaretleme,NucleotideSequence,UcIsaretleme,NucleotideLength,Tm,GcPercent,SelfComp,Self3Comp,HedefBolgeUzunlugu,PrimerDimertur,KaynakTasarlananSistem")] OligoNucleotide oligoNucleotide)
        {
            if (ModelState.IsValid)
            {
                _context.Add(oligoNucleotide);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(oligoNucleotide));
        }
Exemplo n.º 5
0
        public async Task <IActionResult> Create([Bind("Id,Name,RoleLevel,CanAssignTask")] EmployeeRoles employeeRoles)
        {
            if (ModelState.IsValid)
            {
                _context.Add(employeeRoles);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(employeeRoles));
        }
        public async Task <IActionResult> Create([Bind("Id,NumuneAlisTarihi,TeslimAlinan,TeslimAlan,NumuneIsim,NumuneKodu,NumuneTuru,NumuneKurum,DiagenNukleikAsidKodu,EkstraksiyonTarihi,YapanKisi,Yontem,KullanilanKit,Aciklama")] SampleExtraction sampleExtraction)
        {
            if (ModelState.IsValid)
            {
                _context.Add(sampleExtraction);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(sampleExtraction));
        }
Exemplo n.º 7
0
        public async Task <IActionResult> Create([Bind("Id,Temperature,Duration,Cycles")] Pcr1 pcr1)
        {
            if (ModelState.IsValid)
            {
                _context.Add(pcr1);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(pcr1));
        }
        public async Task <IActionResult> Create([Bind("Id,ReferansMakaleler")] ReferenceArticles referenceArticles)
        {
            if (ModelState.IsValid)
            {
                _context.Add(referenceArticles);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(referenceArticles));
        }
Exemplo n.º 9
0
        public async Task <IActionResult> Create([Bind("Id,Kod,Hacim,Sonuc")] NucleicAcid nucleicAcid)
        {
            if (ModelState.IsValid)
            {
                _context.Add(nucleicAcid);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(nucleicAcid));
        }
Exemplo n.º 10
0
        public async Task <IActionResult> Create([Bind("Id,PlananIslem")] ProjectSteps projectSteps)
        {
            if (ModelState.IsValid)
            {
                _context.Add(projectSteps);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(projectSteps));
        }
        public async Task <IActionResult> Create([Bind("Id,ProviderName")] SampleProvider sampleProvider)
        {
            if (ModelState.IsValid)
            {
                _context.Add(sampleProvider);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(sampleProvider));
        }
        public async Task <IActionResult> Create([Bind("Id,Metodlar,Referans")] StepsResearch stepsResearch)
        {
            if (ModelState.IsValid)
            {
                _context.Add(stepsResearch);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(stepsResearch));
        }
        public async Task <IActionResult> Create([Bind("Id,Name,Link")] ResultSlip resultSlip)
        {
            if (ModelState.IsValid)
            {
                _context.Add(resultSlip);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(resultSlip));
        }
Exemplo n.º 14
0
        public async Task <IActionResult> Create([Bind("Id,ItemName,Birimi,Adedi")] WorkItems workItems)
        {
            if (ModelState.IsValid)
            {
                _context.Add(workItems);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(workItems));
        }
Exemplo n.º 15
0
        public async Task <IActionResult> Create([Bind("Id,ProjectRoles,SorumluKisiId,YardimciKisiler,Status,Tamamlanan,BaslangicTarihi,BitisTarihi,KalanSure,CalismaSure")] ProjectState projectState)
        {
            if (ModelState.IsValid)
            {
                _context.Add(projectState);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["SorumluKisiId"] = new SelectList(_context.Employees, "Id", "Id", projectState.SorumluKisiId);
            return(View(projectState));
        }
Exemplo n.º 16
0
        public async Task <IActionResult> Create([Bind("Id,SampleExtractionId,NanogramDegeri,TeslimAlan,TespitDegeri1,TespitDegeri2,TespitDegeri3,TespitDegeri4,TespitDegeri5,TespitDegeri6,TespitDegeri7,TespitDegeri8,TespitDegeri9,GorselLinki,Onay")] Results results)
        {
            if (ModelState.IsValid)
            {
                _context.Add(results);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["SampleExtractionId"] = new SelectList(_context.Set <SampleExtraction>(), "Id", "Id", results.SampleExtractionId);
            return(View(results));
        }
Exemplo n.º 17
0
        public async Task <IActionResult> Create([Bind("Id,Tckn,AdSoyad,Unvan,Email,FotografUrl,CepTelefonu,EvTelefonu,IsTelefonu,DogumTarihi,KullaniciAdi,Parola,EmployeeRoleId,IsActive")] Employees employees)
        {
            if (ModelState.IsValid)
            {
                _context.Add(employees);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["EmployeeRoleId"] = new SelectList(_context.EmployeeRoles, "Id", "Id", employees.EmployeeRoleId);
            return(View(employees));
        }
Exemplo n.º 18
0
        public async Task <IActionResult> Create([Bind("Id,AlimTarihi,AlinanKisi,TeslimAlan,Marka,TeslimAlinanAdet,WorkItemsId")] WorkItemType workItemType)
        {
            if (ModelState.IsValid)
            {
                _context.Add(workItemType);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["WorkItemsId"] = new SelectList(_context.WorkItems, "Id", "Id", workItemType.WorkItemsId);
            return(View(workItemType));
        }
Exemplo n.º 19
0
        public async Task <IActionResult> Create([Bind("Id,WorkItemTypeId,WorkItemUsed,WorkItemDelivered,WorkItemRemaining")] WorkItemMonitor workItemMonitor)
        {
            if (ModelState.IsValid)
            {
                _context.Add(workItemMonitor);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["WorkItemTypeId"] = new SelectList(_context.WorkItemType, "Id", "Id", workItemMonitor.WorkItemTypeId);
            return(View(workItemMonitor));
        }
        public async Task <IActionResult> Create([Bind("Id,OligoNucleotideId,OligoNucleotideMixBId")] OligonucleotideInfo oligonucleotideInfo)
        {
            if (ModelState.IsValid)
            {
                _context.Add(oligonucleotideInfo);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["OligoNucleotideId"]     = new SelectList(_context.OligoNucleotide, "Id", "Id", oligonucleotideInfo.OligoNucleotideId);
            ViewData["OligoNucleotideMixBId"] = new SelectList(_context.Set <OligoNucleotideMixB>(), "Id", "Id", oligonucleotideInfo.OligoNucleotideMixBId);
            return(View(oligonucleotideInfo));
        }
Exemplo n.º 21
0
        public async Task <IActionResult> Create([Bind("Id,ReferenceArticlesId,ProjectStepsId,StepsResearchId,WorkItemsId")] ProjectResearchPlan projectResearchPlan)
        {
            if (ModelState.IsValid)
            {
                _context.Add(projectResearchPlan);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ProjectStepsId"]      = new SelectList(_context.Set <ProjectSteps>(), "Id", "Id", projectResearchPlan.ProjectStepsId);
            ViewData["ReferenceArticlesId"] = new SelectList(_context.Set <ReferenceArticles>(), "Id", "Id", projectResearchPlan.ReferenceArticlesId);
            ViewData["StepsResearchId"]     = new SelectList(_context.Set <StepsResearch>(), "Id", "Id", projectResearchPlan.StepsResearchId);
            ViewData["WorkItemsId"]         = new SelectList(_context.Set <WorkItems>(), "Id", "Id", projectResearchPlan.WorkItemsId);
            return(View(projectResearchPlan));
        }
Exemplo n.º 22
0
        public async Task <IActionResult> Create([Bind("Id,UhtNumber,SdfNumber,ProjeBaslangicTarihi,ProjeBitisTarihi,KullanilacakMesai,BeklenenNumuneAdedi,ProjeSorumlusu,ProjeTuru,IlgiliMusteri,IlgiliMusteriTelNo,IlgiliMusteriEmail,IlgiliMusteriTemsilcisi,ProjeServerLink,ProjeAciklama,ProjeSonDurum,ProjectResearchPlanId,WorkItemMonitorId,OligonucleotideInfoId,SampleExtractionId,PcrProcessId,ResultsId,ProjectStateId,SampleProviderId,ProjectReport")] Projects projects)
        {
            if (ModelState.IsValid)
            {
                _context.Add(projects);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["OligonucleotideInfoId"] = new SelectList(_context.OligonucleotideInfo, "Id", "Id", projects.OligonucleotideInfoId);
            ViewData["PcrProcessId"]          = new SelectList(_context.PcrProcess, "Id", "Id", projects.PcrProcessId);
            ViewData["ProjectResearchPlanId"] = new SelectList(_context.ProjectResearchPlan, "Id", "Id", projects.ProjectResearchPlanId);
            ViewData["ProjectStateId"]        = new SelectList(_context.Set <ProjectState>(), "Id", "Id", projects.ProjectStateId);
            ViewData["ResultsId"]             = new SelectList(_context.Set <Results>(), "Id", "Id", projects.ResultsId);
            ViewData["SampleExtractionId"]    = new SelectList(_context.Set <SampleExtraction>(), "Id", "Id", projects.SampleExtractionId);
            ViewData["SampleProviderId"]      = new SelectList(_context.Set <SampleProvider>(), "Id", "Id", projects.SampleProviderId);
            ViewData["WorkItemMonitorId"]     = new SelectList(_context.Set <WorkItemMonitor>(), "Id", "Id", projects.WorkItemMonitorId);
            return(View(projects));
        }
Exemplo n.º 23
0
        public async Task <IActionResult> Create([Bind("Id,Cihaz,OperatorAdi,Tarih,KayitAdi,CalisanGen,ResultSlipId,Results,MixAId,MixBId,EnzymeId,DH20,DenaturationId,Pcr1Id,Pcr2Id,CoolingId,NucleicAcidId,CalismaAmaci,Yorum")] PcrProcess pcrProcess)
        {
            if (ModelState.IsValid)
            {
                _context.Add(pcrProcess);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["CoolingId"]      = new SelectList(_context.Cooling, "Id", "Id", pcrProcess.CoolingId);
            ViewData["DenaturationId"] = new SelectList(_context.Denaturation, "Id", "Id", pcrProcess.DenaturationId);
            ViewData["EnzymeId"]       = new SelectList(_context.Enzyme, "Id", "Id", pcrProcess.EnzymeId);
            ViewData["MixAId"]         = new SelectList(_context.MixA, "Id", "Id", pcrProcess.MixAId);
            ViewData["MixBId"]         = new SelectList(_context.MixB, "Id", "Id", pcrProcess.MixBId);
            ViewData["NucleicAcidId"]  = new SelectList(_context.NucleicAcid, "Id", "Id", pcrProcess.NucleicAcidId);
            ViewData["Pcr1Id"]         = new SelectList(_context.Pcr1, "Id", "Id", pcrProcess.Pcr1Id);
            ViewData["Pcr2Id"]         = new SelectList(_context.Pcr2, "Id", "Id", pcrProcess.Pcr2Id);
            ViewData["ResultSlipId"]   = new SelectList(_context.Set <ResultSlip>(), "Id", "Id", pcrProcess.ResultSlipId);
            return(View(pcrProcess));
        }