Esempio n. 1
0
 public void Add(Warkah entity)
 {
     entity.RecordStatus = "A";
     using (var context = new AISContext <Warkah>())
     {
         context.DBEntities.Add(entity);
         context.SaveChanges();
     }
 }
Esempio n. 2
0
        public void Update(Warkah entity)
        {
            using (var context = new AISContext <Warkah>())
            {
                Warkah data = context.DBEntities.Where(i => i.NW_Barcode == entity.NW_Barcode).FirstOrDefault();

                if (data == null)
                {
                    //TBD for error exception data not exist
                    throw new Exception("Data Not Exist");
                }
                else
                {
                    data.RecordStatus = entity.RecordStatus.Substring(0, 1);
                    data.Jenis        = entity.Jenis;
                    data.NomorWarkah  = entity.NomorWarkah;
                    data.Tahun        = entity.Tahun;
                    data.No_Album     = entity.No_Album;
                    data.Status       = entity.Status;
                    context.SaveChanges();
                }
            }
        }
Esempio n. 3
0
 public void Delete(Warkah entity)
 {
     throw new NotImplementedException();
 }