public List <V_OPERATION> GetAll() { using (AlfaPlastikContext context = new AlfaPlastikContext()) { return(context.V_OPERATION.OrderBy(r => r.Operasyon_Numarası).ToList()); } }
public void Add(Entities.Models.MOLD mold) { using (AlfaPlastikContext context = new AlfaPlastikContext()) { var sonuc = context.MOLDs.Any(x => x.MOLD_NAME == mold.MOLD_NAME); var sonuc2 = context.MOLDs.Any(x => x.MOLD_NO == mold.MOLD_NO); if (sonuc == true) { MessageBox.Show("aynı isim giremez"); } else { if (sonuc2 == true) { MessageBox.Show("aynı NO giremez"); } else { var entity = context.Entry(mold); entity.State = System.Data.Entity.EntityState.Added; context.SaveChanges(); MessageBox.Show("Kayıt Eklendi"); } } } }
public List <V_WAREHOUSE> GetAll() { using (AlfaPlastikContext context = new AlfaPlastikContext()) { return(context.V_WAREHOUSE.OrderBy(a => a.Ambar_Numarası).ToList()); } }
public string Getope7() { AlfaPlastikContext context = new AlfaPlastikContext(); string oPERATION = context.Database.SqlQuery <string>("Select OPERATION_NAME from OPERATION where OPERATION_ID=39", new SqlParameter("@id", 39)).FirstOrDefault(); return(oPERATION); }
public List <V_MOLD> GetAll() { using (AlfaPlastikContext context = new AlfaPlastikContext()) { return(context.V_MOLD.OrderBy(r => r.KALIP_Numarası).ToList()); } }
public List <V_WRKORD_GRID> GetAll() { using (AlfaPlastikContext context = new AlfaPlastikContext()) { return(context.V_WRKORD_GRID.OrderBy(r => r.İş_Emri_No).ToList()); } }
public List <V_MAINTAINTYPE> GetAll() { using (AlfaPlastikContext context = new AlfaPlastikContext()) { return(context.V_MAINTAINTYPE.ToList()); // OrderBy(r => r.Bakım_Tipi_Numarası). } }
public void Add(WL_PROCESS uc3) { using (AlfaPlastikContext context = new AlfaPlastikContext()) { var entity = context.Entry(uc3); entity.State = System.Data.Entity.EntityState.Added; context.SaveChanges(); } }
public void Update(WL_REQUEST uc1) { using (AlfaPlastikContext context = new AlfaPlastikContext()) { var entity = context.Entry(uc1); entity.State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); } }
public void Delete(Entities.Models.OPERATION ope) { using (AlfaPlastikContext context = new AlfaPlastikContext()) { var entity = context.Entry(ope); entity.State = System.Data.Entity.EntityState.Deleted; context.SaveChanges(); MessageBox.Show("Kayıt Silindi"); } }
public void Update(WRKORD wrk) { using (AlfaPlastikContext context = new AlfaPlastikContext()) { var entity = context.Entry(wrk); entity.State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); MessageBox.Show("Kayıt Güncellendi"); } }
public void Delete(WL_REQUEST uc1) { using (AlfaPlastikContext context = new AlfaPlastikContext()) { var entity = context.Entry(uc1); entity.State = System.Data.Entity.EntityState.Deleted; context.SaveChanges(); MessageBox.Show("Kayıt Silindi"); } }
public void Update(Entities.Models.MOLD mold) { using (AlfaPlastikContext context = new AlfaPlastikContext()) { try { var entity = context.Entry(mold); entity.State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); } catch (Exception) { MessageBox.Show("Aynı değer girilemez"); } } }
public void Update(Entities.Models.WAREHOUSE wrh) { using (AlfaPlastikContext context = new AlfaPlastikContext()) { try { var entity = context.Entry(wrh); entity.State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); MessageBox.Show("Kayıt Güncellendi"); } catch (Exception) { MessageBox.Show("Aynı değer girilemez"); } } }
public void Delete(Entities.Models.MOLD mold) { using (AlfaPlastikContext context = new AlfaPlastikContext()) { var hata = context.WRKORDs.Any(x => x.Mold_ID == mold.MOLD_ID); if (hata == true) { MessageBox.Show("Silinemez Kayıt,Hareket Görmüştür!"); } else { var entity = context.Entry(mold); entity.State = System.Data.Entity.EntityState.Deleted; context.SaveChanges(); MessageBox.Show("Kayıt Silindi"); } } }
public void Delete(Entities.Models.WAREHOUSE wrh) { using (AlfaPlastikContext context = new AlfaPlastikContext()) { var hata = context.MOLDs.Any(x => x.Warehouse_ID == wrh.WAREHOUSE_ID); if (hata == true) { MessageBox.Show("Silinemez Kayıt,Hareket Görmüştür!"); } else { var entity = context.Entry(wrh); entity.State = System.Data.Entity.EntityState.Deleted; context.SaveChanges(); MessageBox.Show("Kayıt Silindi"); } } }
public void Add(WRKORD wrk) { using (AlfaPlastikContext context = new AlfaPlastikContext()) { var sonuc = context.WRKORDs.Any(x => x.WRKORD_NO == wrk.WRKORD_NO); if (sonuc == true) { MessageBox.Show("İŞ EMRİ NUMARASI AYNI OLAMAZ!"); } else { var entity = context.Entry(wrk); entity.State = System.Data.Entity.EntityState.Added; context.SaveChanges(); MessageBox.Show("Kayıt Eklendi"); } } }