public string InsertSeguimiento(CCSeguimientoCab oCCSeguimientoCab, CCSEguimientoDetalle oCCSEguimientoDetalle)
        {
            string result = "";

            using (var SeguimientoDal = new SeguimientoDAl())
            {
                SeguimientoDal.BeginTransaction(System.Data.IsolationLevel.ReadCommitted);
                try
                {
                    oCCSEguimientoDetalle.idseguimiento = SeguimientoDal.InsertSeguimiento(oCCSeguimientoCab);

                    //Registrar Condiciones Basicas
                    SeguimientoDal.InsertSeguimientoDetalle(oCCSEguimientoDetalle);

                    SeguimientoDal.Commit();

                    result = "ok";
                }
                catch (Exception ex)
                {
                    SeguimientoDal.Rollback();
                    result = ex.Message;
                }
            }
            return(result);
        }
Beispiel #2
0
        public void InsertSeguimientoDetalle(CCSEguimientoDetalle oCCSeguimientoDetalle)
        {
            var objCommand = GetSqlCommand("pNLI_GCCSeguimientoDetalle");

            InputParameterAdd.Guid(objCommand, "idSeguimiento", oCCSeguimientoDetalle.idseguimiento);
            InputParameterAdd.Int(objCommand, "tipoinfraestructura", oCCSeguimientoDetalle.tipoinfraestructura);
            InputParameterAdd.Int(objCommand, "estadoequipo", oCCSeguimientoDetalle.estadoequipo);
            InputParameterAdd.Int(objCommand, "estadomaterial", oCCSeguimientoDetalle.estadomaterial);
            InputParameterAdd.Int(objCommand, "tipopersonal", oCCSeguimientoDetalle.personal);
            //InputParameterAdd.Varchar(objCommand, "otros", oCCSeguimientoDetalle.otros);
            InputParameterAdd.Int(objCommand, "idusuarioregistro", oCCSeguimientoDetalle.idusuarioregistro);

            ExecuteNonQuery(objCommand);
        }