コード例 #1
0
ファイル: OperationDal.cs プロジェクト: Semhsen/AlfaPlastik
 public List <V_OPERATION> GetAll()
 {
     using (AlfaPlastikContext context = new AlfaPlastikContext())
     {
         return(context.V_OPERATION.OrderBy(r => r.Operasyon_Numarası).ToList());
     }
 }
コード例 #2
0
ファイル: MoldDal.cs プロジェクト: Semhsen/AlfaPlastik
 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");
             }
         }
     }
 }
コード例 #3
0
ファイル: WarehouseDal.cs プロジェクト: Semhsen/AlfaPlastik
 public List <V_WAREHOUSE> GetAll()
 {
     using (AlfaPlastikContext context = new AlfaPlastikContext())
     {
         return(context.V_WAREHOUSE.OrderBy(a => a.Ambar_Numarası).ToList());
     }
 }
コード例 #4
0
ファイル: Ucisemir2Dal.cs プロジェクト: Semhsen/AlfaPlastik
        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);
        }
コード例 #5
0
ファイル: MoldDal.cs プロジェクト: Semhsen/AlfaPlastik
 public List <V_MOLD> GetAll()
 {
     using (AlfaPlastikContext context = new AlfaPlastikContext())
     {
         return(context.V_MOLD.OrderBy(r => r.KALIP_Numarası).ToList());
     }
 }
コード例 #6
0
ファイル: WorkorderDal.cs プロジェクト: Semhsen/AlfaPlastik
 public List <V_WRKORD_GRID> GetAll()
 {
     using (AlfaPlastikContext context = new AlfaPlastikContext())
     {
         return(context.V_WRKORD_GRID.OrderBy(r => r.İş_Emri_No).ToList());
     }
 }
コード例 #7
0
 public List <V_MAINTAINTYPE> GetAll()
 {
     using (AlfaPlastikContext context = new AlfaPlastikContext())
     {
         return(context.V_MAINTAINTYPE.ToList());
         // OrderBy(r => r.Bakım_Tipi_Numarası).
     }
 }
コード例 #8
0
 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();
     }
 }
コード例 #9
0
 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();
     }
 }
コード例 #10
0
ファイル: OperationDal.cs プロジェクト: Semhsen/AlfaPlastik
 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");
     }
 }
コード例 #11
0
ファイル: WorkorderDal.cs プロジェクト: Semhsen/AlfaPlastik
 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");
     }
 }
コード例 #12
0
 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");
     }
 }
コード例 #13
0
ファイル: MoldDal.cs プロジェクト: Semhsen/AlfaPlastik
 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");
         }
     }
 }
コード例 #14
0
ファイル: WarehouseDal.cs プロジェクト: Semhsen/AlfaPlastik
 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");
         }
     }
 }
コード例 #15
0
ファイル: MoldDal.cs プロジェクト: Semhsen/AlfaPlastik
 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");
         }
     }
 }
コード例 #16
0
ファイル: WarehouseDal.cs プロジェクト: Semhsen/AlfaPlastik
        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");
                }
            }
        }
コード例 #17
0
ファイル: WorkorderDal.cs プロジェクト: Semhsen/AlfaPlastik
        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");
                }
            }
        }