public IActionResult SinyalIslem(int id, string operatorKimlik, int opId, string islem)
        {
            Personel  personel = _personelService.GetById(opId);
            Sinyaller sinyal   = _sinyallerService.getSinyalId(id);

            IslenmisSinyaller islenmisSinyal = new IslenmisSinyaller()
            {
                AboneNo       = sinyal.AboneNo,
                Bolum         = sinyal.Bolum,
                SinyalKod     = sinyal.SinyalKod,
                Zone          = sinyal.Zone,
                SinyalNitelik = sinyal.SinyalNitelik,
                SinyalSaat    = sinyal.SinyalSaat,
                SinyalTarih   = sinyal.SinyalTarih,
                SinyalTAnim   = sinyal.SinyalTAnim
            };

            var tarih = DateTime.Now.ToString("dd/MM/yyyy");
            var saat  = DateTime.Now.ToString("T");

            islenmisSinyal.IslemAcıklama = islem;
            islenmisSinyal.OperatorId    = operatorKimlik;
            islenmisSinyal.IslemTarih    = tarih;
            islenmisSinyal.IslemSaat     = saat;
            _islenmisSinyallerService.Add(islenmisSinyal);
            _sinyallerService.Delete(sinyal);

            TempData["info"] = "Sinyal Başarıyla İşlendi";
            return(RedirectToAction("Index", personel));
        }
Exemple #2
0
        public IActionResult PersonelBilgi(int id)

        {
            Console.WriteLine("Personel id" + id);
            PersonelEkleModel model = new PersonelEkleModel
            {
                _personel = _PersonelService.GetById(id)
            };

            return(View(model));
        }
        public IActionResult GetById(int productId)
        {
            var result = _personelService.GetById(productId);

            if (result.Success)
            {
                return(Ok(result.Data));
            }
            return(BadRequest(result.Message));
        }