private void ArmarEstimado(string usuario) { try { //Ordenado. Cabecera.FecCierre = DateTime.Now; Cabecera.UsuCierre = usuario; Estimado estimado = new Estimado(this, usuario); EstimadoVersion estimadoVer = new EstimadoVersion(estimado, 1); Estimados.CierreOrdenado(estimado, estimadoVer, Cabecera); } catch (Exception ex) { throw new Exception("ArmarEstimado", ex); } }
public static void CierreOrdenado(Estimado estimado, EstimadoVersion estimadoVer, OrdenadoCabDTO ordenadoCab) { using (SqlTransaction tran = dao.IniciarTransaccion()) { try { Create(estimado, tran); Create(estimadoVer, tran); daoOrdenadoCab.Update(ordenadoCab, ordenadoCab.RecId, tran); dao.CommitTransaccion(tran); } catch (Exception) { dao.RollbackTransaccion(tran); throw; } } }