//Gökhan 16.05.2014 public bool SilenPersonelKaydet(int silinecekId, int KullaniciId) { tblKimyasalReceteActLog tempKRL = db.GetGeneric <tblKimyasalReceteActLog>(c => c.SilinenId == silinecekId && c.Turu == 2).LastOrDefault(); if (tempKRL != null) { tempKRL.PersonelIdY = KullaniciId; return(new DBEvents().UpdateGeneric <tblKimyasalReceteActLog>(tempKRL)); } else { return(false); } }
//Gökhan 16.05.2014 public bool Logla(int renkId, int personelId) { List <tblKumasRenkAct> tempL = new List <tblKumasRenkAct>(); tempL = db.GetGeneric <tblKumasRenkAct>(c => c.RenkId == renkId); List <tblKimyasalReceteActLog> temp = new List <tblKimyasalReceteActLog>(); tblKimyasalReceteActLog tempT; foreach (tblKumasRenkAct item in tempL) { tempT = new tblKimyasalReceteActLog(); tempT.SilinenId = item.Id; tempT.ReceteId = null; tempT.OranE = null; tempT.OranY = null; tempT.GrLtOranE = null; tempT.GrLtOranY = item.GrOran; tempT.MiktarE = null; tempT.MiktarY = item.Miktar; tempT.TipE = null; tempT.TipY = null; tempT.FloteE = null; tempT.FloteY = null; tempT.Turu = 5; tempT.Tarih = DateTime.Now; tempT.Saat = DateTime.Now; tempT.PersonelIdE = null; tempT.PersonelIdY = personelId; tempT.KimyasalIdE = null; tempT.KimyasalIdY = item.KimyasalId; tempT.OnayBir = item.OnayBir; tempT.OnayIki = item.OnayIki; tempT.OnayBirTarih = item.OnayBirTarih; tempT.OnayIkiTarih = item.OnayIkiTarih; tempT.RAciklamaE = null; tempT.RAciklamaY = item.Aciklama; tempT.RBoyaKimyaE = null; tempT.RBoyaKimyaY = item.BoyaKimya; tempT.logTuru = 1; tempT.RenkId = item.RenkId; temp.Add(tempT); } return(db.SaveGeneric <tblKimyasalReceteActLog>(temp)); }