Ejemplo n.º 1
0
 public static void UpdateCustomer(Catalogue c)
 {
     using (Team10ADModel m = new Team10ADModel())
     {
         m.Entry(c).State = System.Data.Entity.EntityState.Modified;
         m.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public static void UpdateRep(Employee r)
 {
     using (Team10ADModel m = new Team10ADModel())
     {
         var query = (from s in m.Departments where s.RepresentativeID == r.EmployeeID select s).ToList()[0];
         m.Entry(query).State = System.Data.Entity.EntityState.Modified;
         m.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 public static void UpdateCatalogues(List <Catalogue> clist)
 {
     using (Team10ADModel m = new Team10ADModel())
     {
         foreach (Catalogue c in clist)
         {
             m.Entry(c).State = System.Data.Entity.EntityState.Modified;
         }
         m.SaveChanges();
     }
 }
Ejemplo n.º 4
0
        public static string UpdateRetrievalDetails(List <RetrievalDetail> b)
        {
            using (Team10ADModel m = new Team10ADModel())
            {
                foreach (RetrievalDetail r in b)
                {
                    m.Entry(r).State = System.Data.Entity.EntityState.Modified;
                }
                m.SaveChanges();
            }

            return("xiiiii");
        }
Ejemplo n.º 5
0
        ////////UpdateDisbursement
        public static void UpdateDisbursement(List <DisbursementDetail> input)
        {
            using (Team10ADModel m = new Team10ADModel())
            {
                Disbursement disbursement = new Disbursement();
                disbursement.DisbursementID = Convert.ToInt32(input[0].DisbursementID);
                m.Disbursements.Attach(disbursement);
                m.Entry(disbursement).Property(x => x.Status).IsModified = true;
                m.SaveChanges();

                //foreach (StockAdjustmentVoucherDetail detail in detailList)
                //{
                //    detail.VoucherID = voucher.VoucherID;
                //    m.StockAdjustmentVoucherDetails.Add(detail);
                //    m.SaveChanges();
                //}
            }
        }