//Get_CtaCteServicio_nCtaCteSerImpDef.- Obtener precio for Servicio public double Get_CtaCteServicio_nCtaCteSerImpDef(string cPerJurCodigo, long nCtaCteSerCodigo) { BE_ReqCtaCteSerImpDefault Request = new BE_ReqCtaCteSerImpDefault(); DA_CtaCteServicio da = new DA_CtaCteServicio(); Request.cPerJurCodigo = cPerJurCodigo; Request.nCtaCteSerCodigo = nCtaCteSerCodigo; return da.Get_CtaCteServicio_nCtaCteSerImpDef(Request); }
//------------------------------------- //Get_CtaCteServicio_nCtaCteSerImpDef - //------------------------------------- public double Get_CtaCteServicio_nCtaCteSerImpDef(BE_ReqCtaCteSerImpDefault Request) { double ImpDefault = 0; try { clsConection Obj = new clsConection(); string Cadena = Obj.GetConexionString("Naylamp"); using (SqlConnection cn = new SqlConnection(Cadena)) { cn.Open(); using (SqlCommand cm = new SqlCommand()) { cm.CommandText = "[usp_Get_CtaCteServicio_nCtaCteSerImpDef]"; cm.CommandType = CommandType.StoredProcedure; cm.Parameters.AddWithValue("cPerJurCodigo", Request.cPerJurCodigo); cm.Parameters.AddWithValue("nCtaCteSerCodigo", Request.nCtaCteSerCodigo); cm.Connection = cn; SqlParameter pImp = new SqlParameter(); pImp.ParameterName = "nCtaCteSerImpDef"; pImp.DbType = DbType.Double; pImp.Direction = ParameterDirection.Output; cm.Parameters.Add(pImp); cm.ExecuteNonQuery(); ImpDefault = Convert.ToDouble(cm.Parameters["nCtaCteSerImpDef"].Value); } } } catch (Exception) { throw; } return ImpDefault; }