public void Update(BIANCHI_PROCESS obj) { using (CalicoEntities context = new CalicoEntities()) { var result = context.BIANCHI_PROCESS.Find(obj.id); if (result == null) { return; } context.Entry(result).CurrentValues.SetValues(obj); context.SaveChanges(); } }
public void Update(tblSubCliente obj) { using (CalicoEntities context = new CalicoEntities()) { var result = context.tblSubCliente.Find(obj.subc_proc_id); if (result == null) { return; } context.Entry(result).CurrentValues.SetValues(obj); context.SaveChanges(); } }
public bool updateEnCurso(string interfaz) { using (CalicoEntities context = new CalicoEntities()) { var query = from BP in context.BIANCHI_PROCESS where BP.interfaz == interfaz select BP; var result = query.FirstOrDefault <BIANCHI_PROCESS>(); if (result == null) { return(false); } result.estado = Constants.ESTADO_EN_CURSO; context.Entry(result); context.SaveChanges(); return(true); } }